Test cases and tools for Universal Binary JSON

85 views
Skip to first unread message

Dmitry Razumikhin

unread,
Sep 14, 2014, 4:34:30 PM9/14/14
to universal-...@googlegroups.com
Hi all!

Alpha-version of "ubjson-test-suite" done.

Now it contain a block-notation online parser for generating test case files:
http://dmitry-ra.github.io/ubjson-test-suite/blocks-parser.html

It also support a "$" and "#" optimizations (as described in Draft 10): http://bit.ly/1tSsAjU

Plan for beta: make a node.js version for batch processing block-notation files and generate set of test files to close GitHub issues #8 and #9.

Any feedback is appreciated.
https://github.com/dmitry-ra/ubjson-test-suite

P.S.
This message has an attached file: UBJSON-Response.ubj.
This is a binary serialized sample from http://ubjson.org/type-reference/ page (JSON response from GitHub docs).

---
Dmitry
UBJSON-Response.ubj

Riyad Kalla

unread,
Sep 15, 2014, 10:17:49 AM9/15/14
to universal-...@googlegroups.com
Very cool Dmitry - appreciate you putting this together!

--
You received this message because you are subscribed to the Google Groups "Universal Binary JSON (UBJSON)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to universal-binary...@googlegroups.com.
To post to this group, send email to universal-...@googlegroups.com.
Visit this group at http://groups.google.com/group/universal-binary-json.
For more options, visit https://groups.google.com/d/optout.

Alexander Shorin

unread,
Sep 15, 2014, 10:26:55 AM9/15/14
to universal-...@googlegroups.com
Hi Dmitry,

Awesome! Great work!
But as far as I see your project becomes not an some generic test
suite, but a tool to test generic UBJSON/JSON data. I believe, that
would be the next iteration step, right?
--
,,,^..^,,,

Dmitry Razumikhin

unread,
Sep 15, 2014, 3:33:40 PM9/15/14
to universal-...@googlegroups.com
In other words, my project is a tool for generating files for testing other implementations.
You can make test files by hand using HEX-editor, or just write textual representation using block-notation and convert to binary. Of course it's not a reference implementation, but a tool for "tasting" an specification.

For example: in discussion (https://github.com/thebuzzmedia/universal-binary-json/issues/51) we operate with block notation like this:

[{][#][S][Z]
  [i][4][name][i][3][bob]
  [i][8][password][i][8][pass1234]
  [i][4][role][i][5][admin]
[}]

You can load this to a tool and get binary representation without a reference implementation: http://bit.ly/1m6nhii (for this example it have incorrect highlighting, but valid binary result).
We can compare binary sizes of different proposals without manual calculation etc.
So currently this is a "temporary reference implementation for debug purposes".


Reply all
Reply to author
Forward
0 new messages