I though so too, but it renders the error:

   - File
   
"/private/var/aurorads/virtualenv-csb2/lib/python2.7/site-packages/pyramid-1.5-py2.7.egg/pyramid/request.py",
   line *234*, in json_body

   return json.loads(text_(self.body, self.charset))

   - File
   
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",
   line *338*, in loads

   return _default_decoder.decode(s)

   - File
   
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
   line *365*, in decode

   obj, end = self.raw_decode(s, idx=_w(s, 0).end())

   - File
   
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
   line *383*, in raw_decode

   raise ValueError("No JSON object could be decoded")




2014-05-21 13:34 GMT+03:00 Paul Everitt <[email protected]>:

>
> request.json_body gives a JSON representation of the request data:
>
>
> http://docs.pylonsproject.org/projects/pyramid/en/master/narr/webob.html#request-json-body
>
> --Paul
>
> On May 21, 2014, at 3:50 AM, Heikki Mustonen <[email protected]>
> wrote:
>
> Greetings,
>
> Sorry about double post, if it occured, but i got some weird error message
> on last time when I posted on this group.
>
>
> I've been implementing Canjs javascript-framework on top of Pyramid app (
> canjs.com).
>
> I've some issues in implementing some features and the ajax-communication.
>
> Example:
> Javascript Frontend:
> http://codeshare.io/wHzhu
>
> Pyramid Backend:
> http://codeshare.io/DMm8z
>
> I'm a bit puzzled. How am I able to get the stringified json from the
> request?
>
> Yours
>
>
> --
> Heikki Mustonen
> Rovaniemi, Finland
> Tel:+35840-5920448
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Heikki Mustonen
Rovaniemi, Finland
Tel:+35840-5920448

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to