Class TimeQueryJsonReader
Parses the wire-format JSON envelope for TimeQuery.
public static class TimeQueryJsonReader
- Inheritance
-
TimeQueryJsonReader
- Inherited Members
Remarks
The envelope is shared by every tool that accepts a temporal parameter. Three shapes are accepted:
{ "kind": "instant", "t": "2024-01-01T14:00:00Z" }
{ "kind": "range", "from": "2024-01-01T00:00:00Z", "to": "2024-01-01T06:00:00Z" }
{ "kind": "series", "from": "...", "to": "...", "stepSeconds": 1800 }
All timestamps must be ISO-8601 with an explicit offset or trailing
Z; values without offsets are rejected. stepSeconds
must be a positive number.
Methods
Parse(string)
Parses the JSON envelope. Throws ArgumentException on malformed input.
public static TimeQuery Parse(string json)
Parameters
jsonstring
Returns
Parse(JsonElement)
Parses the JSON envelope from an already-loaded JsonElement.
public static TimeQuery Parse(JsonElement root)
Parameters
rootJsonElement