Commit Graph

69 Commits (6e83fd40686faba4533f2316d20bd44075db4893)

Author SHA1 Message Date
Benjamin Pollack efd22a668f Import a few extra JSON tests from Jansson
Fixes #1189
2016-03-05 07:03:12 -08:00
Doug Coleman 3f9ac2ad9f json.prettyprint: Add a simple json prettyprinter. 2016-02-17 18:36:21 -06:00
John Benediktsson 59caf874a3 syntax: removing #! as a comment character.
We don't need two types of comments and shebang (#!) is handled
natively by the lexer, so the original reason for #! is not valid.
2015-09-09 18:28:08 -07:00
John Benediktsson e477f6996f Fix comments to be ! not #!. 2015-09-08 16:15:10 -07:00
John Benediktsson ceb75057da change ERROR: words from throw-foo back to foo. 2015-08-13 16:13:05 -07:00
Doug Coleman b6be8685c3 basis: ERROR: changes. 2015-08-13 03:20:39 -07:00
Doug Coleman abb8bd74b9 json.reader: Fix json reader for empty files to parse as H{ }. Add path>json word.
Rename read-jsons
2015-08-03 12:23:08 -07:00
John Benediktsson 663fba1d7d json.reader: fix segfault when parsing non-JSON documents. 2015-07-28 18:10:24 -07:00
John Benediktsson 922cbebf8a json.reader: enforce json> takes a string. 2015-07-28 18:02:57 -07:00
Doug Coleman 1fcf96cada factor: remove """ string syntax for now. there are HEREDOC:, STRING:, escaping \", and something else soon. 2015-07-25 22:59:56 -07:00
Doug Coleman 892c62e1dc factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test 2015-07-03 09:39:59 -07:00
Doug Coleman 40892c0302 tests: prefer ${ } instead of 1array 2015-07-02 14:56:14 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
Doug Coleman 999aa7c897 factor: clean up spaces in -tests files 2015-07-02 10:34:01 -07:00
Doug Coleman e3cb325040 factor: clean up whitespace in -docs files 2015-07-02 10:31:22 -07:00
Jon Harper 5c23f10e50 json.writer: add an explicit error when serializing fp-specials 2015-06-10 22:51:39 -07:00
Jon Harper 5ed3aef603 json.reader: read Infinity, -Infinity and NaN 2015-06-10 22:51:38 -07:00
Jon Harper 496ff53f22 json.reader: read UTF-16 surrogate pairs 2015-06-10 22:51:38 -07:00
John Benediktsson dfa763434e Fix tests broken by word hashcode change. 2015-06-09 20:37:55 -07:00
John Benediktsson 2453a785f7 json.writer: make sure we make hex values two digits zero padded. 2015-01-04 09:37:03 -08:00
John Benediktsson 1ec43d7913 json.writer: support escaping unicode > 0x10000. Thanks @jonenst! 2015-01-03 08:30:26 -08:00
John Benediktsson 167f4e789c json.writer: don't escape spaces, thats weird. 2014-12-25 08:39:53 -08:00
John Benediktsson 08ec579f87 json: rename json-allow-nans? to json-allow-fp-special?. 2014-11-28 16:36:07 -08:00
John Benediktsson a363c2faf4 json: rename to json-coerce. 2014-11-28 08:51:16 -08:00
John Benediktsson 9bba5d1312 json: cleanup and add more parameters for writing. 2014-11-28 08:11:21 -08:00
John Benediktsson d83231a08a json: better support for escaped strings. 2014-11-27 14:52:18 -08:00
Doug Coleman fb0cae4790 json.writer: Didn't end up using present vocab after all. 2014-11-23 08:50:28 -08:00
Doug Coleman 1451c8c157 json.writer: Allow more objects to be keys in >json. Not completely sure about -Infinity being a key when ``jsvar-encode?`` is true. See #1189, this might solve it but we need more stress testing it. 2014-11-23 04:02:52 -08:00
John Benediktsson dcbe85fe9c json.writer: handle special floats. 2014-11-14 17:56:19 -08:00
Benjamin Pollack 2c3dd8c3c8 Remove executable bit from tons of files that aren't 2014-11-05 20:40:42 -08:00
John Benediktsson ddea3286d9 basis: fix some doc usings. 2014-05-24 06:59:54 -07:00
John Benediktsson 57f9d78892 improve help by linking to types directly. 2014-05-23 20:20:15 -07:00
John Benediktsson b56556f0ab json: some performance improvements. 2013-03-14 18:53:13 -07:00
John Benediktsson 6b3e416bc1 json.writer: slightly faster using first2. 2012-07-11 20:47:38 -07:00
John Benediktsson 749d05ac6c json.writer: using interleave is much cleaner (thanks @jckarter!). 2012-07-11 20:41:25 -07:00
John Benediktsson a4894fe8c1 json.writer: faster writing, makes the json benchmark almost twice as fast. 2012-07-11 19:31:57 -07:00
John Benediktsson a9b6561fe3 json.reader: make json parsing faster for files that contain a lot of spaces. 2012-07-11 18:45:10 -07:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Doug Coleman 94db86a6db Make "foo.private" require load foo instead.
Move require from vocabs.loader to vocabs. Update everything.
Fixes #201.
2011-11-02 11:50:03 -07:00
John Benediktsson 6f1c44b46d Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson 4726757d95 json.reader: cleanup and speed up when handling heavily escaped strings. 2011-09-15 07:59:17 -07:00
otoburb b56c2b9589 json.writer: Updated docs to mention the dynamic variable jsvar-encode? 2011-07-05 00:07:59 -04:00
otoburb fb95a19352 json.writer: Currified jsvar-encode. Removed whitespace in tuple>fields json output. Added tests to json.writer-tests. 2011-07-04 23:14:51 -04:00
otoburb 210228b911 json.writer: Ability to turn jsvar-encode substitution on/off via jsvar-encode? dynamic variable. Added test cases. 2011-06-23 01:28:24 -04:00
Joe Groff b9c5c2e02c json.reader: factor read-jsons from json> 2010-06-03 13:11:47 -07:00
Slava Pestov 48373a6c4c Remove math.floats.parser now that its no longer needed 2010-02-08 16:52:29 +13:00
Slava Pestov 38ca12e9d8 math.floats.parser: new vocabulary with old string>float word 2010-02-08 08:32:13 +13:00
Joe Groff 6199d3fccc json: if-json-null combinator, in the same vein as if-zero, if-empty, etc. 2010-02-05 14:10:06 -08:00
Alec Berryman 1a1487d11c json reader: correctly handle empty objects in objects
Attempting to parse { "foo" : {} } previously resulted in an error.
(close-hash) expected to consolidate an object into the values of the
containing object (in the first line of code).  While there is none in
the case of the empty hash, the structure of the accumulator looked like
it contained an unconsolidated object, so it folded the values into the
keys and got very confused.
2009-12-27 01:29:12 +13:00