public static ParsedJsonN ParseJson(byte *jsonDataPtr, int jsonDataLength, bool reallocifneeded = true) { ParsedJsonN pj = new ParsedJsonN(); bool ok = pj.AllocateCapacity((uint32_t)jsonDataLength); if (ok) { Global_json_parse(jsonDataPtr, (size_t)jsonDataLength, pj.Handle, reallocifneeded); } else { throw new InvalidOperationException("failure during memory allocation"); } return(pj); }
public static ParsedJsonN ParseJson(byte *jsonDataPtr, long jsonDataLength, bool reallocifneeded = true) { ParsedJsonN pj = new ParsedJsonN(); bool ok = pj.AllocateCapacity((uint)jsonDataLength, 1024); if (ok) { JsonParse(jsonDataPtr, jsonDataLength, pj, reallocifneeded); } else { throw new InvalidOperationException("failure during memory allocation"); } return(pj); }
public ParsedJsonIteratorN(ParsedJsonN pj) { Handle = iterator_iterator(pj.Handle); }