Thread:Talk:Requests for comment/API Future/Clean up formats/reply (4)

Note that software using PHP serialization now should be able to update to JSON by simply changing the format parameter and switching from 'unserialize' to 'json_decode'. There _shouldn't_ be differences in the decoded data format, that I know of.

I threw together a quick benchmark:

On 2000-items of RecentChanges data, file size: 138K rc.json 134K rc.xml 187K rc.phpser

and speed per iteration: $ php test.php Benchmarking xml... 4.436 ms Benchmarking json-objects... 4.846 ms Benchmarking json-assoc... 4.312 ms Benchmarking php... 2.776 ms

So yes, on ~140-190KB of tightly-packed RC data you might save 2 milliseconds of low-level parse time. I'm not convinced this is a significant savings.