Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 18081
Status: resolved
Priority: 0/
Queue: YAML-Syck

Owner: Nobody in particular
Requestors: CRAKRJACK [...]

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

Subject: JSON-RPC class identification support
The JSON-RPC spec ( contains the following provision to serialize class information: ---snip-- 3. JSON Class hinting There are only simple data types defined in JSON. To overcome this problem in a JSON compatible way a special property for objects is introduced. {"__jsonclass__":["constructor", [param1, ], "prop1": ...} The object is then instantiated using the constructor, passing in the parameters. Once constructed the properties (prop1, ...) will be applied. ---snip--- I would like to see JSON::Syck be able to handle this. Perhaps the ability to define two callbacks. 1) During dumping, given a blessed reference, get the [ "constructor", param ] args back. 2) During loading, given when a hash where the __jsonclass__ key is found, pass that hashref into a callback and get an object back. I think this would help address any naming convention/security/implementation concerns and leave it as open as possible. Does libsyck/JSON::Syck currently tackle structures depth-first? Thanks, Tyler
Ticket migrated to github as

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to