Introduction
December 3, 2023 ยท View on GitHub
Introduction
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! ๐๐ก
Setup
Refer to the noir-json-parser setup instructions.
Overview
The tests are organized into two modules:
-
parsefocuses 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/valuefolder) - property value tests (
parse/propertyfolder) - nested object value tests (
parse/nestedfolder)
The scenarios are structured around the five JSON value types:
object,array,string,number, andliteral.In each of these folders, the
numbertests are split up into three files (number.nr,exponent.nr, andfractional.nr) to ease development.The scenarios further include
whitespaceandescapedcharacter tests.The
utils.nrfile contains wrappers to ease testing of specific values in these scenarios. - single value tests (
convertfocuses 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, namelyObjectandJSON.
Contributing
Get in touch with the owners via Noir Discord to get approved as a collaborator.
Use the hashtag noir-json-parser.