PDA

View Full Version : JSON v2.0+



alekz
2008-01-18, 17:16
Are there any plans to migrate to JSON v2.0+?

This is what I get:

[JSON::XS::to_json has been renamed to encode_json, either downgrade to pre-2.0 versions of JSON::XS or rename the call at /opt/local/squeezecenter-7.0-16426-noCPAN/Slim/Control/Queries.pm line 412
. . . etc

Renaming from from_json and to_json to decode_json and encode_json respectively is not a big deal (I have a script for that), just curious if there are any special reasons for using the old version and any problems I might expect using v2.0+.

Thanks!

andyg
2008-01-18, 17:35
On Jan 18, 2008, at 7:16 PM, alekz wrote:

>
> Are there any plans to migrate to JSON v2.0+?
>
> This is what I get:
>
> [JSON::XS::to_json has been renamed to encode_json, either downgrade
> to
> pre-2.0 versions of JSON::XS or rename the call at
> /opt/local/squeezecenter-7.0-16426-noCPAN/Slim/Control/Queries.pm line
> 412
> . . . etc
>
> Renaming from from_json and to_json to decode_json and encode_json
> respectively is not a big deal (I have a script for that), just
> curious
> if there are any special reasons for using the old version and any
> problems I might expect using v2.0+.

Probably not for 7.0... 1.5 is working just fine and I don't want to
risk introducing any bugs. It's unfortunate that the module author
decided to break the API instead of adding the 2 lines of code it
would have taken to maintain compatibility. Might get around to
upgrading for 7.0.1. For now, you need to downgrade.

alekz
2008-01-18, 17:59
Thanks much!
I haven't stumbled upon any serious problems yet, so I will continue using v2.0.