[Dancer-users] storing JSON in a db for later use

damien krotkine dkrotkine at gmail.com
Tue Dec 28 10:11:40 CET 2010


Hi,

my comments below:

On 26 December 2010 05:49, Puneet Kishor <punk.kish at gmail.com> wrote:

>
> I have a longish JSON object in the browser that I stringify and send back
> to the server with the help of jQuery. I store this string into a sqlite db.
> The string looks like
>
>
> [{"data":"{"year":"1900","harvest_area":"126800.00", .. (very long string)
>

This string is not a valid JSON in my opinion. Unless you mis-pasted it in
your email, you have a quote problem :

[{"data":"{"year":"1900","harvest_area":"126800.00"

should be :

[{"data":{"year":"1900","harvest_area":"126800.00"...

Well, there are still unneeded quotes, but at least it would be valid JSON I
think.

So I suggest you check the mechanism you use to create your JSON string. It
seems like it doesn't support nested structures or something like that.

Hope that helps,
dams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20101228/a6764dfa/attachment.htm>


More information about the Dancer-users mailing list