jsony icon indicating copy to clipboard operation
jsony copied to clipboard

Switch to context based.

Open treeform opened this issue 3 years ago • 1 comments

treeform avatar Dec 26 '21 19:12 treeform

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.

beef331 avatar Jan 01 '22 10:01 beef331