API Reference
Class
ValueJson
JSON for display, written with the shared value rules (ValueShaper): records become objects (dictionary keys of any type as text), collections arrays, a record seen again on the way down "(cycle)", values past the depth limit "…", secure strings masked and byte arrays as their size. Text that already is JSON is re-indented.
Inheritance
- Object
- ValueJson
Methods
public static String Serialize(Object? value, Int32 depth = 4, ShapeOptions? options = null) #Returns:
StringA value as indented JSON. Finite documents are written in full, without the display node/time limits; collection enumeration must terminate. Record getters retain the shared stall protection.
Parameters
- value System.Object?
- The value.
- depth System.Int32 = 4
- How many levels of records and collections to write (default 4).
- options ConsoleMonster.Values.ShapeOptions? = null
- Shape options, or null.
Returns
The JSON text.
public static Boolean TryReindent(String text, out String indented) #Returns:
BooleanRe-indents a JSON object or array with two spaces per level, or returns false when the text is not valid JSON.
Parameters
- text System.String
- The text.
- indented System.String
- The indented JSON.
Returns
True when the text is JSON.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?