Problem with build 2012.937 and json

I just updated my version of Corona to 2012.937 (was previously on 2011.268) and I am attempting to make changes to an app that uses json.lua It works fine with 268 (is published in app store) but when I build it in version 2012.937 I get the following error:

2012-10-27 18:52:36.437 Corona Simulator[14136:f07] Runtime error
…5zbdy59wh3tgkxym0000gn/T/TemporaryItems/38/ioLib.lua:50: attempt to index global ‘Json’ (a nil value)
stack traceback:
[C]: ?
…5zbdy59wh3tgkxym0000gn/T/TemporaryItems/38/ioLib.lua:50: in function ‘saveOutTable’
…95zbdy59wh3tgkxym0000gn/T/TemporaryItems/38/game.lua:124: in function ‘new’
…dy59wh3tgkxym0000gn/T/TemporaryItems/38/director.lua:289: in function ‘loadScene’
…dy59wh3tgkxym0000gn/T/TemporaryItems/38/director.lua:527: in function ‘changeScene’
…95zbdy59wh3tgkxym0000gn/T/TemporaryItems/38/menu.lua:417: in function <…95zbdy59wh3tgkxym0000gn>
?: in function <?:229>

If I go back to 268, it works fine. Does anyone have any idea what might have changed in the new version?

Any help would be appreciated.

thanks.
[import]uid: 23600 topic_id: 32413 reply_id: 332413[/import] </…95zbdy59wh3tgkxym0000gn>

JSON was updated to a different version probably sometime between 268 and now. The new json is much better. However it looks like you have a capital J in json. It looks like in ioLib.lua, that it’s maybe trying to load the old Json. Just make sure that you go through your lua files and make sure it:

json = require(“json”)

not

json = require(“Json”)

Now for your variable, it’s okay to be Json like:

Json = require(“json”)

but for convenience sake, its best to standardize on all lower case for it.
[import]uid: 19626 topic_id: 32413 reply_id: 128913[/import]

Thanks. I changed all syntax to lowercase (encode and decode) and that fixed it. I read that json now comes pre-installed so I guess i had the latest version and just had to change the letter cases.

thanks again for you help.

[import]uid: 23600 topic_id: 32413 reply_id: 128979[/import]

make sure to remove any json.lua files in your project too. [import]uid: 19626 topic_id: 32413 reply_id: 128991[/import]

JSON was updated to a different version probably sometime between 268 and now. The new json is much better. However it looks like you have a capital J in json. It looks like in ioLib.lua, that it’s maybe trying to load the old Json. Just make sure that you go through your lua files and make sure it:

json = require(“json”)

not

json = require(“Json”)

Now for your variable, it’s okay to be Json like:

Json = require(“json”)

but for convenience sake, its best to standardize on all lower case for it.
[import]uid: 19626 topic_id: 32413 reply_id: 128913[/import]

Thanks. I changed all syntax to lowercase (encode and decode) and that fixed it. I read that json now comes pre-installed so I guess i had the latest version and just had to change the letter cases.

thanks again for you help.

[import]uid: 23600 topic_id: 32413 reply_id: 128979[/import]

make sure to remove any json.lua files in your project too. [import]uid: 19626 topic_id: 32413 reply_id: 128991[/import]