paulroth3d / jupyter-ijavascript-utils

Utility library for working with iJavaScript - a Jupyter Kernel
1 stars 0 forks source link

Discuss sorting objects into serialized deterministic order #57

Closed paulroth3d closed 10 months ago

paulroth3d commented 10 months ago

JSON and pojo objects and maps don’t have a defined order, but this can make comparing them challenging - especially with deeply nested objects

Make something that defines the property hierarchy for objects - like ‘tree’ from the root in key,value pairs - that can then be sorted

or deep clone the objects (note this will not preserve classes or inheritance likely) to the list of properties in an ascending order

will help people getting started

paulroth3d commented 10 months ago

related to issue #58

will help people getting started, but also comparing objects.

paulroth3d commented 10 months ago

Looking into it - it seems possible:

but not something that has to be done with this library.

See