While looking through the code, I noticed that _object() already appears to support constructing object containers other than plain hashes.
Would it make sense to expose this through the public API?
Use cases include:
- preserving key order
- integrating with modules such as Hash::Ordered or Tie::IxHash
- using custom mapping classes
For example, an API could look something like:
Sample implementation:
my $json = JSON->new
->object_class('Hash::Ordered');
my $obj = $json->decode($text);
Unless I'm missing something, part of the implementation may already be present internally, but there does not appear to be a public option to select the object container class.
Would you be interested in such a feature?
While looking through the code, I noticed that _object() already appears to support constructing object containers other than plain hashes.
Would it make sense to expose this through the public API?
Use cases include:
For example, an API could look something like:
Sample implementation:
Unless I'm missing something, part of the implementation may already be present internally, but there does not appear to be a public option to select the object container class.
Would you be interested in such a feature?