# FromJson(string)

> Deserializes a graph selection object from a JSON string.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.6/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

```csharp
public static GraphSelection FromJson(string json)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Serialized selection as a JSON string (produced by [EditorJsonUtility.ToJson](/engine/6000.6/script-reference/unityeditor/editorjsonutility/tojson.md)).

### Returns

| Type                                                                                                   | Description                                          |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| [GraphSelection](/engine/6000.6/script-reference/unityeditor/experimental/graphview/graphselection.md) | Graph selection object, or null if empty or invalid. |
