public static abstract sealed class Sandbox.Json
A convenience JSON helper that handles `Sandbox.Resource` types for you.
Related Guides
Broader workflow and conceptual references connected to this API.
When displaying text such as Hello World, you should instead use a localization token like #menu.helloworld. This will automatically replace the text with the corresponding language set by the user when set on a Label, allowing you to easily support multiple languages.
If you are using HTTP requests or WebSockets in your game, you can use Auth Tokens to validate that the requests were sent from a valid Steam user in a s&box game session. This is useful if you want to tie data to a specific Steam account, or prevent botting.
You can define upgraders for components. Useful when making a breaking change to a component such as property renaming, or new data structures.
s&box provides a static Http class, this lets you easily create asynchronous HTTP requests of different methods (GET, POST, DELETE, etc…) providing JSON content and parsing JSON responses.
You can define movies and play them back using C#.
The Storage system provides a simple, unified way to manage user-generated content in your game. Whether you're saving game progress, storing player creations, or anything else, Storage handles everything from local file management to Steam Workshop integration.
Methods
Showing 18 methods
public static System.Text.Json.Nodes.JsonObject ApplyPatch(System.Text.Json.Nodes.JsonObject sourceRoot, Sandbox.Json.Patch patch, System.Collections.Generic.HashSet`1<Sandbox.Json.TrackedObjectDefinition> definitions)
public static Sandbox.Json.Patch CalculateDifferences(System.Text.Json.Nodes.JsonObject oldRoot, System.Text.Json.Nodes.JsonObject newRoot, System.Collections.Generic.HashSet`1<Sandbox.Json.TrackedObjectDefinition> definitions)
public static System.Text.Json.Nodes.JsonNode WalkJsonTree(System.Text.Json.Nodes.JsonNode node, System.Func`3<string,System.Text.Json.Nodes.JsonValue,System.Text.Json.Nodes.JsonNode> onValue, System.Func`3<string,System.Text.Json.Nodes.JsonObject,System.Text.Json.Nodes.JsonObject> onObject = null)
Parameters
onObject: Default: null
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Json |