Manatee.Json icon indicating copy to clipboard operation
Manatee.Json copied to clipboard

Split into multiple libraries by function

Open gregsdennis opened this issue 6 years ago • 3 comments

The different functionalities (data model, serialization, schema, path, pointer, & transform) are all fairly disjoint as far as internal dependencies. I wonder if I should split out the libraries based on that functionality. It could also give me insight as to which components are being used more often.

See also #40 and a few others where the features do cross over.

gregsdennis avatar Jun 26 '18 22:06 gregsdennis

This is becoming a more and more important question as I add support for new uses of JSON.

  • #155 (Newtonsoft-to-Manatee conversion)
  • #160 (JSONata support)
  • #164 (JsonLogic support)

These could all theoretically (and ideally) be separate libraries that build on the JSON data structure.

Maybe the proper way to get this started (and in a non-breaking way) is to implement these as independent libraries.


Perhaps serialization should be coupled with the data structure and parsing. They seem fairly common requirements. I can't imagine too many instances where you'd want the model but not serialization.

gregsdennis avatar Jul 05 '18 01:07 gregsdennis

The recent refactor of the Schema implementation has revealed multiple references to serialization internals, mostly around reflection. I'm starting to think this is less of a good idea.

gregsdennis avatar Oct 23 '18 03:10 gregsdennis

This approach is followed in the new https://github.com/gregsdennis/json-everything suite.

gregsdennis avatar Oct 18 '20 23:10 gregsdennis