Greetings and salutations!
Behold, a compendium of tests venturing into the realms of deserialization magic wielded by the venerable noir-json-parser
library.
Crafted in the enigmatic 🌌Noir programming language, these tests embark on a cosmic journey to guarantee the impeccable parsing and transformation of JSON data.
Come hitch a ride with us through the Aztec ZK-rollup galaxy of data! 🚀📡
Refer to the noir-json-parser
setup instructions.
The tests are organized into two modules:
-
parse
focuses on the parsing aspect of JSON data.This module checks the parsability of a JSON string value in three different scenarios:
- single value tests (
parse/value
folder) - property value tests (
parse/property
folder) - nested object value tests (
parse/nested
folder)
The scenarios are structured around the five JSON value types:
object
,array
,string
,number
, andliteral
.In each of these folders, the
number
tests are split up into three files (number.nr
,exponent.nr
, andfractional.nr
) to ease development.The scenarios further include
whitespace
andescaped
character tests.The
utils.nr
file contains wrappers to ease testing of specific values in these scenarios. - single value tests (
convert
focuses on the conversion aspect of JSON data into native types. It includes tests for converting various flavors of[u8; N]
instances to native types, such asbool
,Field
, byte-strings, array-lists ([[u8]]
), as well as the structs introduced bynoir-json-parser
, namelyObject
andJSON
.
Get in touch with the owners via Noir Discord to get approved as a collaborator.
Use the hashtag noir-json-parser
.