Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
toJson Stack Overflow
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tony Zakula  
View profile  
 More options Dec 15 2010, 1:10 pm
From: Tony Zakula <tonyzak...@gmail.com>
Date: Wed, 15 Dec 2010 12:10:38 -0600
Local: Wed, Dec 15 2010 1:10 pm
Subject: toJson Stack Overflow
Hi all,

I am creating a JavaScript object from a set of Java objects.  I am
using a Java library that parses an email.  It is doing quite a bit of
recursion.  It seems to be working, but when I try to do an
Myna.print(object.toJson) to take a look at what is being generated, I
get a stack overflow.  Is there any easy way to increase the stack
size?  Or do I basically need to try and generate the text?  Or do I
need to make this a much simpler object?

Thanks,

Tony Z


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Zakula  
View profile  
 More options Dec 15 2010, 1:18 pm
From: Tony Zakula <tonyzak...@gmail.com>
Date: Wed, 15 Dec 2010 12:18:05 -0600
Local: Wed, Dec 15 2010 1:18 pm
Subject: toJson Stack Overflow
The Rhino toSource() seemed to do the trick.

Hi all,

I am creating a JavaScript object from a set of Java objects.  I am
using a Java library that parses an email.  It is doing quite a bit of
recursion.  It seems to be working, but when I try to do an
Myna.print(object.toJson) to take a look at what is being generated, I
get a stack overflow.  Is there any easy way to increase the stack
size?  Or do I basically need to try and generate the text?  Or do I
need to make this a much simpler object?

Thanks,

Tony Z


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Porter  
View profile  
 More options Dec 15 2010, 1:59 pm
From: Mark Porter <m...@porterpeople.com>
Date: Wed, 15 Dec 2010 11:59:24 -0700
Local: Wed, Dec 15 2010 1:59 pm
Subject: Re: [mynajs-general] toJson Stack Overflow
toJson() should really be reserved for data obects. In particular it
cannot handle circular references which cause infinite recursion and
stack overflow. Myna.dump/printDump/textDump handle this by setting a
max depth to prevent stack overflow and are a good choice for
debugging.
----------------------------------------------------------
Mark Porter

Myna JavaScript Application Server
Easy web development with server-side JavaScript
http://www.mynajs.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »