Package ac.simons.oembed
Class OembedJsonParser
- java.lang.Object
-
- ac.simons.oembed.OembedJsonParser
-
- All Implemented Interfaces:
OembedParser
public final class OembedJsonParser extends java.lang.Object implements OembedParser
Provides JSON Parsing forOembedResponses. This class uses a privateObjectMapperto ensure that the JAXB annotation introspector is configured correctly.- Author:
- Michael J. Simons, 2010-12-24
-
-
Constructor Summary
Constructors Constructor Description OembedJsonParser()Creates a new OembedJsonParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmarshal(OembedResponse oembedResponse, java.io.OutputStream out)OembedResponseunmarshal(java.io.InputStream in)Unmarshals anOembedResponsefrom the given inputstream
-
-
-
Method Detail
-
unmarshal
public OembedResponse unmarshal(java.io.InputStream in)
Description copied from interface:OembedParserUnmarshals anOembedResponsefrom the given inputstream- Specified by:
unmarshalin interfaceOembedParser- Parameters:
in- The inputstream to unmarshal- Returns:
- A full OembedResponse
-
marshal
public void marshal(OembedResponse oembedResponse, java.io.OutputStream out)
Description copied from interface:OembedParser- Specified by:
marshalin interfaceOembedParser- Parameters:
oembedResponse- The oembed response that should be written to the streamout- The outputstream to write to
-
-