Unless you are using another JavaScript library with that functionality built in, then Json2.js is the way to go.
http://www.json.org/json2.js Chad Killingsworth On Mar 17, 10:00 am, Chris Apolzon <[email protected]> wrote: > No, but if you just need JSON conversion, json2.js will do it for you much > cheaper than loading Prototype. > > On Wed, Mar 17, 2010 at 10:57 AM, Xabi <[email protected]> wrote: > > Actually I use Prototype framework (prototype.org) > > > Object.toJSON(<json object>) -> string > > > But I ask if there's other way without load a framework, a way using > > some function of the Maps API > > > On 17 mar, 15:48, Brak <[email protected]> wrote: > > > Someone correct me if I'm wrong, but you'd need some sort of function > > > to iterate through your variable and convert it to display everything > > > as a string. Similar to PHP's print_r function or Perl's Data::Dumper > > > module. You can probably find one elsewhere on the internet, but not > > > here. This is a general JavaScript issue. > > > > Alternatively, if you just want to see WTF is inside that variable, > > > you can use Google Chrome or Safari's Inspector/Developer Tools, > > > Firefox's Firebug extension, or Internet Explorer's Developer Toolbar. > > > Those tools let you look at the contents of variables either by using > > > a breakpoint or outputting variable contents to a console log (minus > > > IE for the latter). > > > > Hope that helps. > > > > On Mar 17, 5:35 am, Xabi <[email protected]> wrote: > > > > > geocoder = new google.maps.Geocoder(); > > > > > geocoder.geocode({'latLng':marker.getPosition()}, > > > > function(response,status){ > > > > > //At this point I need to store the response as a Json String in > > > > a HTML TextArea element. I want to retrieve the string conversion of > > > > the JSON Objeto.How can I do it? > > > > > }) > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Maps JavaScript API v3" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-maps-js-api-v3%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
