Represents any JSON value, potentially containing other JSON values. A .float value may be an approximation of the original value. Arbitrary precision numbers can be represented by .number_string values.

Fields

null: void,
bool: bool,
integer: i64,
float: f64,
number_string: []const u8,
string: []const u8,
array: Array,
object: ObjectMap,

Functions

fn dump(self: Value) void

No documentation provided.

fn jsonParse(allocator: Allocator, source: anytype, options: ParseOptions) ParseError(@TypeOf(load))!@This()

No documentation provided.

fn jsonParseFromValue(allocator: Allocator, source: Value, options: ParseOptions) !@This()

No documentation provided.

fn jsonStringify(value: anytype, jws: anytype) !void

No documentation provided.

fn parseFromNumberSlice(s: []const u8) Value

No documentation provided.

DocTests

test Value {
    var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{});
    defer parsed.deinit();
    try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string);
}