AcresCoreJson.h#
Core/Source/AcresCoreJson.h Generated
A small JSON document reader for ACRES Core (no Unreal, no third-party library): the Core loads the same Content/Simulation files the game reads with Unreal's FJsonObject (site.json, surface_polygons.json, fields.json, tractor.json, farm.json, soils.json, sensors_polaris.json, ...). Numbers are doubles, objects keep their key order. Load-time only; not thread-safe while parsing, read-only (and thread-safe) afterwards.
ReadFileBytes#
Reads a whole binary file into Out; false when it cannot be read.
FJson#
One JSON value. Objects are ordered (key, value) lists; lookups are linear, which is fine for configuration files.
FJson::Parse#
Parses a document.
| Argument | Description |
|---|---|
Text |
The JSON text. |
Out |
Receives the root value. |
Error |
Receives "what at offset N" on failure (may be null). |
Returns: True on success.
FJson::Load#
Reads and parses a file; false (with Error) when it cannot be read or parsed.
FJson::Kind#
Kind of this value.
FJson::AsNumber#
The number (booleans as 0 / 1), or Default for any other kind.
FJson::AsBool#
The boolean (numbers: non-zero), or Default.
FJson::AsString#
The string, or an empty one.
FJson::Items#
Array elements (empty for a non-array).
FJson::Members#
Object members in file order (empty for a non-object).
FJson::Size#
Number of array elements or object members.
FJson::operator[]#
Array element I (a shared null value when out of range).
FJson::operator[]#
Object member Key (a shared null value when absent).
FJson::Has#
True when this object has member Key.
FJson::Number#
Member Key as a number, or Default when absent or not a number.
FJson::Str#
Member Key as a string, or Default when absent or not a string.
EKind#
Value kinds.
| Value | Description |
|---|---|
NullKind |
|
BoolKind |
|
NumberKind |
|
StringKind |
|
ArrayKind |
|
ObjectKind |