Lines Matching refs:JSONValue

32     JSONValue j = parseJSON(s);
40 if (const(JSONValue)* code = "code" in j) variable
49 JSONValue jj = [ "language": "D" ];
51 jj.object["rating"] = JSONValue(3.5);
53 jj.object["list"] = JSONValue( ["a", "b", "c"] );
55 jj["list"].array ~= JSONValue("D");
102 struct JSONValue
112 JSONValue[string] object;
113 JSONValue[] array;
129 JSONValue j = parseJSON(s);
154 JSONValue j = [ "language": "D" ];
230 @property ref inout(JSONValue[string]) object() inout pure @system in inout()
237 @property JSONValue[string] object(JSONValue[string] v) pure nothrow @nogc @safe in object()
258 @property inout(JSONValue[string]) objectNoRef() inout pure @trusted in inout()
276 @property ref inout(JSONValue[]) array() inout pure @system in inout() argument
283 @property JSONValue[] array(JSONValue[] v) pure nothrow @nogc @safe in array()
305 @property inout(JSONValue[]) arrayNoRef() inout pure @trusted in inout() argument
362 static if (is(Value : JSONValue)) in assign()
364 JSONValue[string] t = arg; in assign()
369 JSONValue[string] aa; in assign()
371 aa[key] = JSONValue(value); in assign()
378 static if (is(ElementEncodingType!T : JSONValue)) in assign()
380 JSONValue[] t = arg; in assign()
385 JSONValue[] new_arg = new JSONValue[arg.length]; in assign()
387 new_arg[i] = JSONValue(e); in assign()
391 else static if (is(T : JSONValue)) in assign()
405 static if (is(ElementEncodingType!T : JSONValue))
411 JSONValue[] new_arg = new JSONValue[arg.length];
413 new_arg[i] = JSONValue(e);
440 this(T : JSONValue)(inout T arg) inout
448 JSONValue j = JSONValue( "a string" );
449 j = JSONValue(42);
451 j = JSONValue( [1, 2, 3] );
454 j = JSONValue( ["language": "D"] );
458 void opAssign(T)(T arg) if (!isStaticArray!T && !is(T : JSONValue))
472 ref inout(JSONValue) opIndex(size_t i) inout pure @safe in inout() argument
482 JSONValue j = JSONValue( [42, 43, 44] );
491 ref inout(JSONValue) opIndex(string k) inout pure @safe in inout() argument
500 JSONValue j = JSONValue( ["language": "D"] );
517 JSONValue[string] aa = null; in opIndexAssign()
529 JSONValue j = JSONValue( ["language": "D"] );
545 JSONValue j = JSONValue( ["Perl", "C"] );
550 JSONValue opBinary(string op : "~", T)(T arg) @safe
555 return JSONValue(a ~ JSONValue(arg).arrayNoRef);
557 else static if (is(T : JSONValue))
559 return JSONValue(a ~ arg.arrayNoRef);
572 a ~= JSONValue(arg).arrayNoRef;
574 else static if (is(T : JSONValue))
604 JSONValue j = [ "language": "D", "author": "walter" ];
608 bool opEquals(const JSONValue rhs) const @nogc nothrow pure @safe in opEquals()
613 bool opEquals(ref const JSONValue rhs) const @nogc nothrow pure @trusted in opEquals()
642 int opApply(scope int delegate(size_t index, ref JSONValue) dg) @system in opApply()
657 int opApply(scope int delegate(string key, ref JSONValue) dg) @system in opApply()
703 JSONValue parseJSON(T)(T json, int maxDepth = -1, JSONOptions options = JSONOptions.none)
708 JSONValue root;
910 void parseValue(ref JSONValue value) in parseValue()
927 JSONValue[string] obj; in parseValue()
933 JSONValue member; in parseValue()
950 JSONValue[] arr; in parseValue()
953 JSONValue element; in parseValue()
1120 JSONValue parseJSON(T)(T json, JSONOptions options)
1135 string toJSON(const ref JSONValue root, in bool pretty = false, in JSONOptions options = JSONOption…
1210 void toValue(ref in JSONValue value, ulong indentLevel) @safe in toValue()
1372 JSONValue jv0 = JSONValue("test测试");
1374 JSONValue jv00 = JSONValue("test\u6D4B\u8BD5");
1377 JSONValue jv1 = JSONValue("été");
1379 JSONValue jv11 = JSONValue("\u00E9t\u00E9");
1407 JSONValue jv = "123";
1443 static assert(is(typeof(value) == JSONValue));
1456 static assert(is(typeof(value) == JSONValue));
1468 jv = JSONValue("value");
1472 JSONValue jv2 = JSONValue("value");
1476 JSONValue jv3 = JSONValue("\u001c");
1485 JSONValue jv = 1;
1504 jv.object = ["key" : JSONValue("value")];
1506 assert(jv.object == ["key" : JSONValue("value")]);
1508 jv.array = [JSONValue(1), JSONValue(2), JSONValue(3)];
1510 assert(jv.array == [JSONValue(1), JSONValue(2), JSONValue(3)]);
1527 JSONValue jarr = JSONValue([10]);
1529 jarr.array ~= JSONValue(i);
1532 JSONValue jobj = JSONValue(["key" : JSONValue("value")]);
1534 jobj.object[text("key", i)] = JSONValue(text("value", i));
1542 JSONValue jarr = JSONValue([10]);
1544 jarr ~= [JSONValue(i)];
1547 JSONValue jobj = JSONValue(["key" : JSONValue("value")]);
1549 jobj[text("key", i)] = JSONValue(text("value", i));
1555 assert(jarr[0] == JSONValue(10));
1593 JSONValue val;
1658 JSONValue jv;
1715 assert(JSONValue(float.nan).toString(JSONOptions.specialFloatLiterals) == nanString);
1716 assert(JSONValue(double.infinity).toString(JSONOptions.specialFloatLiterals) == infString);
1717 …assert(JSONValue(-real.infinity).toString(JSONOptions.specialFloatLiterals) == negativeInfString);
1720 assertThrown!JSONException(JSONValue(float.nan).toString);
1721 assertThrown!JSONException(JSONValue(double.infinity).toString);
1722 assertThrown!JSONException(JSONValue(-real.infinity).toString);
1725 JSONValue jvNan = parseJSON(nanString, JSONOptions.specialFloatLiterals);
1726 JSONValue jvInf = parseJSON(infString, JSONOptions.specialFloatLiterals);
1727 JSONValue jvNegInf = parseJSON(negativeInfString, JSONOptions.specialFloatLiterals);
1745 JSONValue testVal;
1750 testVal = (JSONValue[string]).init;
1751 testVal = JSONValue[].init;
1761 JSONValue testVal = a; in Test()
1778 const json0 = JSONValue(num0); in test()
1814 auto v = JSONValue("\U0001D11E");
1834 auto v = JSONValue("\xFF");