Commit graph

72 commits

Author SHA1 Message Date
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
Dragos Carp
7ae5e539c2 Added JSONValue dictionary add and vector append 2014-07-21 23:12:53 +02:00
Dmitry Olshansky
d97dc15d82 Merge pull request #2292 from markisaa/constToString
Issue 13015 - std.json.JSONValue's toString is now const
2014-07-05 12:57:22 +04:00
Mark Isaacson
0d3507f636 std.json.JSONValue toString is now const 2014-07-04 19:02:18 -07:00
Mark Isaacson
333e7e734f Issue 13013 - Converted real to double in std.json.JSONValue 2014-07-02 15:40:30 -07:00
k-hara
c90ef1b823 Mark some unittest blocks deprecated to suppress messages during Phobos build 2014-06-29 15:52:06 +09:00
jmdavis
12b6cc75ff There's no point in scheduling deprecations anymore.
deprecate no longer generates an error, so we might as well just
deprecate directly.
2014-06-20 04:37:13 -07:00
Andrej Mitrovic
7ac188b0ef Avoid double lookup in opIndex for std.json. 2014-05-23 11:50:21 +02:00
Steven Dwy
13fbd451bc std.json: ensure objects contain keys 2014-05-22 11:05:00 -07:00
Mark Isaacson
f457e4781c Added an in operator to std.json.JSONValue. Tested when const/non-const 2014-05-21 17:54:58 -07:00
Vladimir Panteleev
ee7de10ee9 fix Issue 12332 - std.json API broken without notice 2014-03-09 19:23:36 +00:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
Masahiro Nakagawa
b9a9b31968 Add tests for ref array() / object() getters 2014-02-09 23:50:01 +09:00
Masahiro Nakagawa
aeda1ec9a2 Add ref to array() and object() of JSONValue getters to assign new element 2014-02-09 23:22:14 +09:00
Martin Nowak
436f284709 Merge pull request #1694 from John-Colvin/patch-5
Documetation fixes

Conflicts:
	std/json.d
2013-12-16 05:20:02 +01:00
monarchdodra
833a713661 fix bool test 2013-11-26 08:24:19 +01:00
SHOO
007302fd1e Fix and test for JSONValue(true), JSONValue(false) 2013-11-25 22:52:13 +09:00
k-hara
6b21137ebe Update ddoc comment 2013-11-20 21:01:02 +09:00
k-hara
20b9d60c24 Make type field to read-only property, then make store and type_tag private 2013-11-20 21:01:00 +09:00
k-hara
5440ea8fbc fix Issue 11527 - JSONValue cannot set values through named fields 2013-11-20 21:00:58 +09:00
John Colvin
8550c8809a Documetation fixes
corrected the documentation for JSON_TYPE and added documentation for JSONValue.this
2013-11-16 12:22:50 +00:00
David
1958c95666 Improved std.json api, typesafe and easier to use 2013-10-23 23:50:00 +02:00
Dmitry Olshansky
9a053d97c2 new std.uni module 2013-07-20 23:00:34 +04:00
k-hara
03a32d6fa4 Fix issue 313 & 314 2013-06-25 08:38:30 +09:00
Jonathan M Davis
22c75c7904 Merge pull request #1313 from klickverbot/mingw-format
Adjust floating point formatting tests for MinGW
2013-06-16 04:30:27 -07:00
David Nadlinger
5465e59779 Adjust floating point formatting tests for MinGW.
As far as I am aware, the C standard doesn't make any
guarantees about what the leading digit in the hex formats
is, nor about the number of exponent digits displayed by
default.

We should look into replacing the functions with our own
implementations to provide consistent behavior independent
of the host C runtime library, and potentially also allowing
the functionality to be used from CTFE.
2013-06-16 13:13:50 +02:00
Denis Shelomovskij
a6afc98eeb Add formatting option to std.json.toJSON.
This allows JSON to be used as a temporary serialization format when debugging an application as it becomes human- and diff-readable.

Empty JSON object/array is formatted as "{}"/"[]".
2013-06-12 16:28:06 +04:00
Denis Shelomovskij
0fe395f178 Fix issue in std.json when null is returned instead of empty string/array. 2013-04-04 00:49:42 +04:00
Denis Shelomovskij
6c17b383df [refactoring] Minor refactoring of std.json. 2013-04-01 17:13:43 +04:00
Denis Shelomovskij
b37673c16d [styling] Put open bracket on its own line in std.json. 2013-04-01 17:13:43 +04:00
Denis Shelomovskij
ef1dd42f82 [whitespace] Fix spaces in std.json. 2013-04-01 17:13:43 +04:00
Denis Shelomovskij
10bd83ebcd [comments] Remove old commented out code in std.json. 2013-04-01 17:13:43 +04:00
Jacob Carlborg
a272a595ad Fixes Issue 9794 - std.json cannot handle delete character 2013-03-23 17:39:30 +01:00
k-hara
01df2f60be Remove redundant parenthesis for getters, and use assignment syntax for setters 2012-11-23 15:07:17 +09:00
darkstalker
813dadfb47 fix for "some std.json improvements"
missing check for negative value
2012-07-08 23:51:18 -04:00
darkstalker
f8173c0425 std.json: properly handle large ulong values (bigger than 2^63-1)
store large ulong values in JSONValue.uinteger instead of throwing an overflow exception
2012-05-01 19:44:51 -04:00
darkstalker
2d625ddc6f std.json: implement opIndex in struct JSONValue for accessing elements with array/hash syntax 2012-05-01 19:40:47 -04:00