com.h3c.util.json

## Interface JsonFactory

- All Known Implementing Classes:
    AbstractJsonFactory, CoreServicesJsonFactory, NetworkServicesJsonFactory, OfJsonFactory

      public interface JsonFactory

  A JSON Factory interface.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonCodec<?>` | `codec(Class<?> pojo)` Returns a given codec for the given POJO.
    `boolean` | `hasCodec(Class<?> pojo)` Sees if this JsonFactory has a codec for the given POJO class.
    `InputStream` | `schema()` Returns the JSON schema for this factory.

- - ### Method Detail

    - #### schema

          InputStream schema()

      Returns the JSON schema for this factory.
      Returns:
        JSON schema for this factory

    - #### hasCodec

          boolean hasCodec(Class<?> pojo)

      Sees if this JsonFactory has a codec for the given POJO class.
      Parameters:
        `pojo` - POJO class to be encoded/decoded
      Returns:
        true if there is a codec, false otherwise

    - #### codec

          JsonCodec<?> codec(Class<?> pojo)

      Returns a given codec for the given POJO.
      Parameters:
        `pojo` - POJO for which a JSON codec is requested.
      Returns:
        a JSON codec for the given POJO.
      Throws:
        `JsonCodecException` - if no codec found for the given POJO

Copyright © 2014. All Rights Reserved.