jsony
jsony copied to clipboard
Switch to context based.
The one issue I see is that you're using a ref object so hooks do not abide by mutability, if you must have a ref might I suggest distinct JsonyParseContext and JsonyDumpContext to ensure only the operations allowed are ones you permit. The dump context would of course lack add. This way you get all the benefits of the ref but you know unless the user really wants to do something "unsafe" they will not. Preventing issues like the one above.