Nigel Tao
2742a4f4be
Have wuffs_aux take lvalue (not rvalue) references
2020-08-17 00:02:49 +10:00
Nigel Tao
0291a47dc8
Remove example/jsonptr's ability to speak CBOR
...
Originally, the example/jsonptr program read JSON from stdin and wrote
JSON to stdout. Over the course of numerous recent commits, it gained
the ability to read either CBOR or JSON and write either CBOR or JSON.
(CBOR is, very roughly, a binary file format similar to the JSON text
file format). While a useful feature, the extra code hurt JSON-to-JSON
performance, the original motivating purpose of that program. This
commit reverts that feature, re-gaining original performance. (The
example/cbor-to-json and example/json-to-cbor programs were recently
added to convert between CBOR and JSON, covering that feature loss).
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:
$ time gen/bin/example-jsonptr < citylots.json > /dev/null
Before this commit:
real 0m5.095s
After:
real 0m3.583s
Ratio: 1.42x
$ sloccount example/jsonptr/jsonptr.cc | grep ^cpp
Before this commit:
cpp: 1508 (100.00%)
After:
cpp: 869 (100.00%)
Ratio: 1.74x
This commit brings jsonptr.cc approximately to its state just before
168f60a7 "Add example/jsonptr -output-format=cbor flag" was committed,
although it keeps the flags added since then for allowing comments and
inf/NaN numbers.
2020-08-13 22:58:59 +10:00
Nigel Tao
b3438434ca
Add json QUIRK_JSON_POINTER_ALLOW_TILDE_R_TILDE_N
2020-08-13 00:06:56 +10:00
Nigel Tao
8aac6767bb
Add example/jsonfindptrs -query=STR flag
2020-08-12 23:18:37 +10:00
Nigel Tao
da3504833e
Have Decode{Cbor,Json} quirks default to empty
2020-08-11 13:46:50 +10:00
Nigel Tao
ca5da1fb9d
Have example C++ programs use override specifier
2020-08-10 15:30:12 +10:00
Nigel Tao
62c4feb268
Let wuffs_aux::DecodeJson use BACKSLASH_X_AS_BYTES
2020-08-10 15:22:05 +10:00
Nigel Tao
6d81764e14
Tweak wuffs_aux::DecodeJsonCallbacks
2020-08-09 23:15:41 +10:00
Nigel Tao
484c1d5fc3
Delete unused MAX_INDENT definition
2020-08-09 23:11:06 +10:00
Nigel Tao
0b7eaf291b
Add example/cbor-to-json
2020-08-09 23:03:42 +10:00
Nigel Tao
0a5940d399
Tweak example/jsonfindptrs -input-etc flags
2020-08-07 13:15:41 +10:00
Nigel Tao
cf8884d44c
Rename example/library to example/toy-genlib
2020-08-05 11:55:51 +10:00
Nigel Tao
50bfab9998
Tweak example/*/*.cc compile instructions
2020-08-05 11:39:09 +10:00
Nigel Tao
f557dad608
Add example/json-to-cbor
2020-08-04 23:45:46 +10:00
Nigel Tao
cf6c578973
Add aux library
2020-08-04 23:43:38 +10:00
Nigel Tao
0a68f6332a
Have jsonptr pass through CBOR floating points
2020-07-28 10:39:32 +10:00
Nigel Tao
c96b31c7bf
Suppress jsonptr byte string output when in query
2020-07-27 23:07:49 +10:00
Nigel Tao
77c7551b26
Fix jsonptr whitespace and commas for CBOR tags
2020-07-27 21:35:11 +10:00
Nigel Tao
35c4e9532b
Fix jsonptr's JSON output for CBOR simple values
2020-07-27 18:01:05 +10:00
Nigel Tao
983a74f257
Let jsonptr accept integer CBOR map keys
2020-07-27 15:56:56 +10:00
Nigel Tao
ee6927fcdb
Have jsonptr pass around slice_u8 more often
2020-07-27 12:08:33 +10:00
Nigel Tao
d6a10dfe8a
Add io_buffer.{read,writ}er_slice methods
2020-07-27 11:47:47 +10:00
Nigel Tao
ea53245441
Have jsonptr base64url encode CBOR byte strings
2020-07-27 00:03:00 +10:00
Nigel Tao
dd114696d8
Let jsonptr output inf and NaN
2020-07-25 21:55:30 +10:00
Nigel Tao
5a616b6693
Have std/cbor parse floating point numbers
2020-07-24 23:54:52 +10:00
Nigel Tao
c9e2010040
Tweak std/cbor TOKEN_VALUE_MINOR__ETC bits
2020-07-24 23:19:12 +10:00
Nigel Tao
042e94f304
Have std/cbor parse simple values
2020-07-24 23:14:27 +10:00
Nigel Tao
271680333e
Have std/cbor parse tags
2020-07-24 15:54:44 +10:00
Nigel Tao
f8dfc76310
Have std/cbor parse objects
2020-07-24 11:41:22 +10:00
Nigel Tao
702c7b299f
Let wuffs_base__utf_8__etc take ptr-to-const-u8
2020-07-22 15:42:54 +10:00
Nigel Tao
03a87ea3ef
Add jsonptr check for to-be-extended token length
2020-07-21 23:29:26 +10:00
Nigel Tao
850dc18d16
Have std/cbor produce extended inline integers
2020-07-21 22:52:04 +10:00
Nigel Tao
c9d4e34dfc
Split ETC__VBC__INLINE_INTEGER into {,un}signed
2020-07-21 15:31:49 +10:00
Nigel Tao
51a38295b6
Let jsonptr accept inf and NaN
2020-07-19 22:47:34 +10:00
Nigel Tao
7cb7654a4d
Re-organize jsonptr.cc
2020-07-19 22:19:04 +10:00
Nigel Tao
d191a3fc5f
Have std/cbor parse text strings
2020-07-19 22:17:48 +10:00
Nigel Tao
3c8589b6e9
Let jsonptr output CBOR metadata as JSON comments
2020-07-19 21:49:00 +10:00
Nigel Tao
af75772cc2
Have std/cbor parse byte strings
2020-07-18 17:27:11 +10:00
Nigel Tao
664f8431d2
Have std/cbor parse negative integers
2020-07-16 21:25:14 +10:00
Nigel Tao
4e193599ac
Add std/cbor
2020-07-15 14:08:37 +10:00
Nigel Tao
168f60a781
Add example/jsonptr -output-format=cbor flag
2020-07-14 15:57:05 +10:00
Nigel Tao
cd183f92b0
Fix jsonptr start_of_token_chain initial value
2020-07-14 12:11:05 +10:00
Nigel Tao
ecadf72e6b
Rename some example/json* flags
2020-07-13 08:25:59 +10:00
Nigel Tao
e0ca5a4c3c
Have base_16 codec return a transform__output
2020-07-09 21:09:19 +10:00
Nigel Tao
c766bb72d6
Have example/jsonetc read and write extra commas
2020-07-09 13:15:36 +10:00
Nigel Tao
6b7ce30e32
Add wuffs_base__parse_number_xxx options arg
2020-07-07 16:19:46 +10:00
Nigel Tao
c29853ffef
Add links to other convert-to-nia implementations
2020-06-16 14:24:00 +10:00
Nigel Tao
f45f01f4f3
Update clang-format from v5 to v9
2020-06-05 14:06:56 +10:00
Nigel Tao
dcb81a85bb
Prepare to decode BMP embedding a JPEG or PNG
2020-05-27 13:37:54 +10:00
Nigel Tao
f3b9704e4d
Rename some color_u32_argb_premul conversion funcs
2020-05-19 23:39:26 +10:00