P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
is there a way to preserve the order Not exactly, but JSON can sort JSON object keys. You need to call $json->canonical() before $json->encode($data). Note that this adds some significant overhead. The big question remains: Why do you need sorted keys in the object? Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-) In reply to Re: Preserve the order in JSON
by afoken
|
|