parseJson

Parses json value

  1. Asdf parseJson(Chunks chunks, size_t initLength)
    parseJson
    (
    Flag!"includingNewLine" includingNewLine = Yes.includingNewLine
    Flag!"spaces" spaces = Yes.spaces
    Chunks
    )
    (
    Chunks chunks
    ,
    size_t initLength = 32
    )
    if (
    is(ElementType!Chunks : const(ubyte)[])
    )
  2. Asdf parseJson(char[] str, Allocator allocator)
  3. Asdf parseJson(char[] str)

Parameters

chunks Chunks

input range composed of elements type of const(ubyte)[]. chunks can use the same buffer for each chunk.

initLength size_t

initial output buffer length. Minimum value is 32.

Return Value

Type: Asdf

ASDF value

Examples

import std.range: chunks;
auto text = cast(const ubyte[])`true `;
auto ch = text.chunks(3);
assert(ch.parseJson(32).data == [1]);

Meta