Package: crispum
crispum=======Cross-language declarative parsing pipeline.Installation------------| Node: ``npm i crispum --save``| Python: ``pip install crispum``, or if you're clever``pipenv install crispum``Usage-----Crispum is designed to take in static JSON schema objects and returnback a parser function which will apply all of the transformationslisted in the schema object.Here is an example of a simple`obstruction <https://github.com/bendrucker/obstruction>`__ example... code:: json{"type": "simple","keys": {"indeed": "awesome"}}This schema would transform the following object..... code:: json{"awesome": "it works!"}into.. code:: json{"indeed": "it works!"}The schema may also be an array of instructions, and can applyinstructions to to the whole object or to each element of an array... code:: json[{"type": "pluck","key": "indeed"}, {"type": "array"}, {"type": "conditional","key": "foo","default": {"type": "filter"},"options": {"bar": {"type": "pluck","key": "nested"},"baz": {"type": "pluck","key": "special"}}}, {"type": "dearray"}, {"type": "simple","keys": {"result": "0","extra": "1"}}]This results in a complex multistep schema, which when appled to datalike this..... code:: json{"extra": "oh hey","indeed": [{"foo": "bar","nested": "value"}, {"foo": "boozle","nested": "lost in space"}, {"foo": "baz","nested": "value","special": "so bazzy"}]}results in..... code:: json{"result": "value","extra": "so bazzy"}API===``crispum(schema)`` -> ``function (data)``^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Create a new crispum parser with the options passed. The returned parsemethod takes one parameter, which is input data, and returns thetransformed data.schema~~~~~~| *Required*| Type: ``object`` or ``array``The schema may either be a single instruction or an array of them. Eachinstruction must have a ``type``, and may optionally contain an``array`` field.When ``array`` is true, the current data will be reinterpreted as anarray and each instruction will execute on the entries instead of thelist itself.Available types are...array^^^^^The array instruction tells the crispum pipeline to run all subsequentinstructions as if they had ``array: true`` set. It also can take in anoptional parameters, ``keys````keys`` is a list of keys to copy from the data into each element ofthe array before continuing on the pipelineconditional^^^^^^^^^^^The conditional instruction looks at the value of a specified key andthen executes a different instruction based on the value found.-  ``key``: They keyname to check the conditional against-  ``default``: The default instruction if the value found is not in theoptions list-  ``options``: An associative array of instruction optionsdearray^^^^^^^Stops an array pipeline and goes back to interpreting the data as awhole instead of each element.filter^^^^^^This instruction deletes the current data and does ont take anyparameters. This is useful in combination with ``array`` and``conditional``simple^^^^^^Simple onyl takes 1 other parameter, which is ``keys``. Keys should be avalid `obstructionschema <https://github.com/bendrucker/obstruction#schema-definitions>`__.The result is the same as the output obstruction would generate, exceptextra keys not mentioned in the schema are not removed.pluck^^^^^The pluck instruction takes a given key and rebases the dataset onto it.It takes in two parameters \* ``key``: The keyname to grab and rebasethe current dataset onto \* ``keys``: An array of extra keys to copyfrom the parent object into the plucked valueLicense=======MIT