Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Preserve the order in JSONby user786 (Sexton) |
on Jun 16, 2015 at 20:16 UTC ( [id://1130703]=perlquestion: print w/replies, xml ) | Need Help?? |
user786 has asked for the wisdom of the Perl Monks concerning the following question: I have written a perl script to edit the a json file. I need to check if cp is 10000 and set custcap to 99999 if so. If the cp is not equal to 10000, just exit out of the file without making changes. The script works as expected. It makes the necessary changes and saves the files. however after the changes,the order of the parameters in JSON file changes> I read the json spec, My understanding is json is unordered. can some one help me out with preserving the order config file
After script execution the order of the file changes. is there a way to preserve the order ?
Back to
Seekers of Perl Wisdom
|
|