Topic
  • 3 replies
  • Latest Post - ‏2012-11-20T00:51:50Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic Server side stringify

‏2012-11-16T22:16:02Z |
Hello,

I'd like to print a JSON object to the console. When I try to use json.stringify in an adapter, I'm told JSON is not defined. Anyone know how to import it?
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Server side stringify

    ‏2012-11-16T22:27:15Z  
    You can't call the JSON object there.

    Related question:
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14873830
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Server side stringify

    ‏2012-11-19T06:46:20Z  
    Hi Ed,

    try to use the Javascript sourcecode of the JSON implementation available here:

    https://github.com/douglascrockford/JSON-js
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Server side stringify

    ‏2012-11-20T00:51:50Z  
    at server side, I use following worklight API.

    com.worklight.server.integration.api.JSObjectConverter.toFormattedString(myParam)