Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/MOXy/JSON Geocode"

Line 2: Line 2:
  
 
=JSON Binding: Google Geocode Example=
 
=JSON Binding: Google Geocode Example=
 +
 +
This example will demonstrate mapping a single object model to both XML and JSON using the same set of metadata.  Google Maps Geocoding API V2 will be used to provide the XML and JSON inputs for this example.
 +
 +
==XML Input==
 +
 +
Below is the link we will use to get the data as XML.  This is specified in the output parameter.
 +
 +
http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=xml&sensor=false&key=YOUR_KEY_HERE

Revision as of 12:44, 18 June 2012

JSON Binding: Google Geocode Example

This example will demonstrate mapping a single object model to both XML and JSON using the same set of metadata. Google Maps Geocoding API V2 will be used to provide the XML and JSON inputs for this example.

XML Input

Below is the link we will use to get the data as XML. This is specified in the output parameter.

http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=xml&sensor=false&key=YOUR_KEY_HERE

Back to the top