I've recently been consuming APIs written in PHP and found an unexpected behaviour in the JSON returned.
It appears the default behaviour for PHP is to automatically convert an empty object ("bacon" : {}
) into an empty array ("bacon" : []
).
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
I've recently been consuming APIs written in PHP and found an unexpected behaviour in the JSON returned.
It appears the default behaviour for PHP is to automatically convert an empty object ("bacon" : {}
) into an empty array ("bacon" : []
).