Class OembedJsonParser

  • All Implemented Interfaces:
    OembedParser

    public final class OembedJsonParser
    extends java.lang.Object
    implements OembedParser
    Provides JSON Parsing for OembedResponses. This class uses a private ObjectMapper to ensure that the JAXB annotation introspector is configured correctly.
    Author:
    Michael J. Simons, 2010-12-24
    • Constructor Detail

      • OembedJsonParser

        public OembedJsonParser()
        Creates a new OembedJsonParser.
    • Method Detail

      • unmarshal

        public OembedResponse unmarshal​(java.io.InputStream in)
        Description copied from interface: OembedParser
        Unmarshals an OembedResponse from the given inputstream
        Specified by:
        unmarshal in interface OembedParser
        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
        Marshals the given OembedResponse oembedResponse into the OutputStream out.
        Specified by:
        marshal in interface OembedParser
        Parameters:
        oembedResponse - The oembed response that should be written to the stream
        out - The outputstream to write to