Thibaut CHARLES
210d0f70ab
Wrong exception message std.json
2016-05-25 12:10:36 +02:00
Jack Stouffer
7a62d7ca24
Fixed long lines in std/json.d
2016-05-10 20:51:39 -04:00
Sebastian Wilzbach
3d67cd228c
style fix: space between operators
2016-04-26 22:26:20 +03:00
Lionello Lunesu
1f1ed031a3
Fix issue 15884 Encode wstring/wchar[]/dstring/dchar[] as JSON string
2016-04-14 16:34:19 +08:00
Dmitry Olshansky
ada161f0c5
Merge pull request #4176 from BBasile/issue-15884
...
fix issue 15884 - Assigning char[] to std.json.JSONValue creates array, not string
2016-04-11 16:39:50 +04:00
Basile Burg
329f068d7a
fix issue 15884 - Assigning char[] to std.json.JSONValue creates array, not string
2016-04-09 10:01:51 +02:00
Basile Burg
e1120aa9e1
add an option allowing to escape non ascii chars
2016-04-09 07:58:53 +02:00
Dmitry Olshansky
c75dc478ea
Merge pull request #4108 from dhasenan/std_json_safe
...
Make std.json @safe.
2016-04-05 20:58:59 +04:00
dhasenan
56542b2c1b
parseJSON works with @system ranges
2016-03-24 15:44:37 +00:00
dhasenan
113e79abec
parseJSON infer @safety
2016-03-24 13:56:32 +00:00
dhasenan
70690946aa
opIndexAssign @safe should be inferred
2016-03-24 13:55:01 +00:00
dhasenan
4373141b52
toJSON takes a ref rather than a pointer
2016-03-24 13:47:51 +00:00
dhasenan
4bfb6cd694
fixed JSONValue.str() signature
2016-03-23 13:16:24 +00:00
dhasenan
9872b64816
address review feedback
2016-03-23 13:09:51 +00:00
dhasenan
c6ec8d01ca
Make std.json @safe.
...
(Four @trusted methods, but who's counting?)
2016-03-22 23:19:59 +00:00
Tomoya Tanjo
3dbea90a87
Using ref
instead of out
for std.json.parseJSON
2016-03-22 22:20:48 +09:00
Tomoya Tanjo
a023336625
Replace version(unittest) with unittest
2016-03-03 00:07:31 +09:00
Tomoya Tanjo
1794186a11
Make parseJSON CTFEable for object of object and array of array
2016-03-02 21:46:13 +09:00
Dragos Carp
cacd081e11
std.json: Encode control characters
2015-12-16 00:55:09 +01:00
Basile Burg
c10012129d
documented opIn
2015-12-07 11:41:17 +01:00
Jonathan M Davis
d34164a2ea
Move some deprecations along.
2015-11-26 00:28:38 -08:00
Nick Sabalausky
b46de002e1
Doc formatting fixes for https://github.com/D-Programming-Language/dmd/pull/4745
2015-10-14 15:29:14 -04:00
Vladimir Panteleev
f26d542967
std.json: Rename JsonOptions to JSONOptions
...
Discussion:
http://forum.dlang.org/post/tjlziczxnjlmckdmdnxn@forum.dlang.org
2015-06-29 19:34:29 +00:00
Jonathan Crapuchettes
4c3cc9d523
Add attributes to methods in std.json.
2015-05-29 22:35:11 -06:00
Ryan
51674c81d7
JSON: remove unused import std.typecons : Flag.
2015-04-13 23:09:07 -04:00
Ryan
fecf9b3972
JSON: Nan/Inf code review tweaks.
...
Replace Flag!"JsonSpecialFloats" with a flagset enum to allow future
extensibility.
Add more documentation to modified functions.
2015-04-13 22:44:49 -04:00
Ryan
c33dca96be
JSON: option to decode special strings as floats.
...
Passing JsonSpecialFloats.yes to parseJSON prompts the parser to interpret
"NaN", "Infinite", and "-Infinite" as the special floating-point values they
represent.
Adds the overload parseJSON(JSONValue, SpecialFloats) that takes a JSONValue and
the JsonSpecialFloats flag so users do not have to pass maxDepth in order to
specify special float handling behavior.
2015-04-10 22:41:32 -04:00
Ryan
ef0b39334d
JSON: option to encode special floats as strings.
...
Adds the SpecialFloats flag to JSONValue.toString, JSONValue.toPrettyString,
and JSONValue.toJSON.
Given SpecialFloats.yes, the special float values NaN, Infinity, and -Infinity
will be encoded as the strings "NaN", "Infinite", "-Infinite".
Given SpecialFloats.no, attempting to stringify a JSONValue containing a
special float value will throw.
This overrides the previous behavior of encoding special float values as
non-string literals, which resulted in non-standard JSON strings.
2015-04-10 09:27:14 -04:00
Ryan
4f423caa9f
Enable std.json.parseJSON to parse nan/inf.
...
JSONValue.toString will output 'nan', 'inf', or '-inf', when it has type
JSON_TYPE.FLOAT and value double.nan/double.infinity/-double.infinity.
However, parseJSON would fail on encountering these values in a string.
This patch enables parseJSON to read special float values.
2015-04-02 23:51:42 -04:00
Dan Olson
e62e2d5b69
Give std.json an opEquals
...
Defining opEquals seems to be needed for correct comparison of the union
used for store.
(cherry picked from commit 8bb22a65ee9650d40f817c47e61819864342ee72)
2015-03-10 22:25:32 -07:00
k-hara
611a9a1b9b
fix property enforcement
2015-02-10 01:00:36 +09:00
JakobOvrum
dfbd50636c
Merge pull request #2923 from yebblies/arraybool9999
...
Replace more implicit array to bool conversions
2015-01-30 04:27:30 +09:00
Vladimir Panteleev
0d1c697272
fix Issue 14065 - std.json not tracking line:column properly
2015-01-28 07:13:59 +00:00
Daniel Murphy
f255c9e689
Replace more implicit array to bool conversions
2015-01-28 16:33:12 +11:00
Andy Colson
f5b01e66ea
ddoc'd unittest
2015-01-22 20:40:08 -06:00
Andy Colson
234915ee09
fix style
2015-01-21 22:34:17 -06:00
Andy Colson
925b329ffb
std.json code samples
2015-01-21 20:11:04 -06:00
Ilya Yaroshenko
2c744b54e1
std.range: constraints => primitives
...
See discussion and voting in #2661
2014-11-23 20:05:20 +03:00
Martin Nowak
8b7322a307
add JSONValue.isNull
...
- short-access similar to array, str, object...
- val.type == JSON_TYPE.NULL is fairly verbose
2014-11-22 17:10:22 +01:00
Ilya Yaroshenko
e94177da90
std.json: clean imports
2014-11-14 16:57:16 +03:00
Dicebot
e6bf3cdcfb
Remove non auto ref
opAssign overload
...
It conflicts with new one and should be completely covered by the nature
of auto ref.
2014-10-23 09:36:57 +03:00
Uranuz
66ea9dfedd
Deleted leading and trailing spaces inside *if* to match code style
2014-10-22 18:23:10 +03:00
Uranuz
f2bc851d7c
std.json: Fixed issue 12969. opIndexAssign operator for JSONValue added. Changed order of elements in enum JSON_TYPE so NULL is a default type when JSONValue is not initialized
...
Signed-off-by: Uranuz <neuranuz@gmail.com>
2014-10-22 18:23:10 +03:00
Geod24
0fb95b8c27
Usage of WEB macro for License everywhere
2014-10-15 11:30:42 +02:00
Andrej Mitrovic
39ed0b4922
Merge pull request #2417 from dcarp/json_indexes
...
JSON object and JSON array operator overloads
2014-09-14 08:52:08 +02:00
Dragos Carp
caef9ff257
Don't alias JSONArray on array concatenation
2014-09-14 03:18:25 +02:00
Andrej Mitrovic
374b6e03e7
Fix Issue 4493 - Add sorting capability to toJSON and add another unittest.
2014-09-09 09:54:22 +02:00
Geod24
7100047473
Replace enforceEx with enforce where it's possible
2014-08-25 12:18:02 +02:00
Dragos Carp
0374afa463
Verify that json array append does not alias the original array
2014-08-24 21:50:24 +02:00
Dragos Carp
3745de66ff
Spelling
2014-07-22 21:08:11 +02:00