MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / WriteJson

Method WriteJson

Source/Editor/ProjectInfo.cs:23–31  ·  view source on GitHub ↗

Original implementation is based on Newtonsoft.Json VersionConverter Writes the JSON representation of the object. The to write to. The value. The calling serializer.

(JsonWriter writer, object value, JsonSerializer serializer)

Source from the content-addressed store, hash-verified

21 /// <param name="value">The value.</param>
22 /// <param name="serializer">The calling serializer.</param>
23 public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
24 {
25 if (value == null)
26 writer.WriteNull();
27 else if (value is Version)
28 writer.WriteValue(value.ToString());
29 else
30 throw new JsonSerializationException("Expected Version object value");
31 }
32
33 /// <summary>
34 /// Reads the JSON representation of the object.

Callers

nothing calls this directly

Calls 3

WriteNullMethod · 0.45
WriteValueMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected