{"repo":"mununki/ppx_spice","free":true,"listed":false,"github":"https://github.com/mununki/ppx_spice","clone":"git clone https://github.com/mununki/ppx_spice.git","description":"ReScript PPX which generates the JSON (de)serializers","language":"JavaScript","stars":58,"topics":["github-actions","ocaml"],"license":"MIT","category":"workflow-automation","readme_excerpt":"Spice A ReScript PPX, which generates JSON (de)serializers. Spice is originated from - The Spice melange in the novel, Dune - A flavor for the (polymorphic) variant This PPX is highly influenced by Decco and developed with forking the source codes of Decco. Spice has implemented all the features of Decco@1.5.0 and additional useful features for the (polymorphic) variant of its own. Motivation 1. Parse the string instead of the array to the (polymorphic) variant To parse the JSON data, Decco is being heavily used in many projects. But, there's a restriction to parse the JSON string into a (polymorphic) variant with the Decco. The JSON data should be formed in an array. It is obvious at some point. But generally, we face the string data which needs to be parsed into the variant in most use cases. Whenever it is needed to parse the response in Json, the custom encoder/decoder functions are needed to parse the Json string into the (polymorphic) variant with Decco. But you don't need to write it with the Spice as long as you add @spice.as in (polymorphic) variants. with Decco with Spice 2. Parse/stringify the Unicode string There are many cases to parse and stringify the string data into (polymorphic) variants. Furthermore, the Unicode string needs to be handled with a variant. Currently, pattern matching is not working for the Unicode string in ReScript, the Spice is using if ... then ... else to compare the Unicode string in case of adding @spice.as attribute. 3. Last but not le","default_branch":null,"files":null,"tree":[],"storefront":"/r/mununki","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mununki/ppx_spice/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}