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 "User:Rick.barkhouse.oracle.com/Test1"

Line 14: Line 14:
  
 
This will return us the following JSON.  For this example, we are only interested in the '''title''' and '''url''' fields of '''data/children'''.
 
This will return us the following JSON.  For this example, we are only interested in the '''title''' and '''url''' fields of '''data/children'''.
 +
 +
<div class="NavFrame">
 +
<div class="NavHead">Reddit JSON Output</div>
 +
<div class="NavContent">
  
 
<div style="font-size:50%">
 
<div style="font-size:50%">
Line 66: Line 70:
 
       ...
 
       ...
 
</source>
 
</source>
 +
</div>
 +
</div>
 
</div>
 
</div>

Revision as of 13:48, 28 May 2013

Dynamic JAXB: Flickr Example

This example will demonstrate how to use MOXy's Dynamic JAXB features to work with public JSON and XML feeds, without having to create concrete Java classes.

Getting JSON from Reddit

Reddit provides a public JSON feed using the following URL format:

http://www.reddit.com/r/science/top/.json?sort=top&t=day&limit=5

This will return us the following JSON. For this example, we are only interested in the title and url fields of data/children.

Back to the top