org.eclipse.lyo.oslc4j.provider.json4j

## Class JsonHelper

- java.lang.Object
- - org.eclipse.lyo.oslc4j.provider.json4j.JsonHelper

-     public final class JsonHelper
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `OSLC4J_READ_SPECIAL_NUMS` System property "org.eclipse.lyo.oslc4j.readSpecialNumberValues" : When "true", read "INF", "-INF", and "NaN" strings for Infinity, -Infinity, and NaN float and double values, respectively.
    `static String` | `OSLC4J_WRITE_SPECIAL_NUMS` System property "org.eclipse.lyo.oslc4j.writeSpecialNumberValues" : When "true", write "INF", "-INF", and "NaN" strings for Infinity, -Infinity, and NaN float and double values, respectively.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static void` | `addAboutURI(org.apache.wink.json4j.JSONObject jsonObject, Map<String,String> namespaceMappings, Map<String,String> reverseNamespaceMappings, Class<? extends Object> objectClass, URI aboutURI)`
    `protected static void` | `addExtendedProperties(Map<String,String> namespaceMappings, Map<String,String> reverseNamespaceMappings, org.apache.wink.json4j.JSONObject jsonObject, IExtendedResource extendedResource, Map<String,Object> properties, Map<Object,org.apache.wink.json4j.JSONObject> visitedObjects)`
    `static org.apache.wink.json4j.JSONObject` | `createJSON(String descriptionAbout, String responseInfoAbout, ResponseInfo<?> responseInfo, Object[] objects, Map<String,Object> properties)`
    `protected static void` | `fillInRdfType(String rdfPrefix, org.apache.wink.json4j.JSONObject jsonObject, IExtendedResource resource)`
    `static Object[]` | `fromJSON(org.apache.wink.json4j.JSONObject jsonObject, Class<?> beanClass)`
    `protected static org.apache.wink.json4j.JSONObject` | `handleResourceReference(Map<String,String> namespaceMappings, Map<String,String> reverseNamespaceMappings, Class<?> resourceClass, Method method, URI uri)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OSLC4J_WRITE_SPECIAL_NUMS

          public static final String OSLC4J_WRITE_SPECIAL_NUMS

      System property "org.eclipse.lyo.oslc4j.writeSpecialNumberValues" : When "true", write "INF", "-INF", and "NaN" strings for Infinity, -Infinity, and NaN float and double values, respectively. Enabled by default.
      See Also:
        `OSLC4J_READ_SPECIAL_NUMS`, Constant Field Values

    - #### OSLC4J_READ_SPECIAL_NUMS

          public static final String OSLC4J_READ_SPECIAL_NUMS

      System property "org.eclipse.lyo.oslc4j.readSpecialNumberValues" : When "true", read "INF", "-INF", and "NaN" strings for Infinity, -Infinity, and NaN float and double values, respectively. Enabled by default.
      See Also:
        `OSLC4J_WRITE_SPECIAL_NUMS`, Constant Field Values

  - ### Method Detail

    - #### createJSON

          public static org.apache.wink.json4j.JSONObject createJSON(String descriptionAbout,
                                                     String responseInfoAbout,
                                                     ResponseInfo<?> responseInfo,
                                                     Object[] objects,
                                                     Map<String,Object> properties)
                                                              throws DatatypeConfigurationException,
                                                                     IllegalAccessException,
                                                                     IllegalArgumentException,
                                                                     InvocationTargetException,
                                                                     org.apache.wink.json4j.JSONException,
                                                                     OslcCoreApplicationException

      Throws:
        `DatatypeConfigurationException`
        `IllegalAccessException`
        `IllegalArgumentException`
        `InvocationTargetException`
        `org.apache.wink.json4j.JSONException`
        `OslcCoreApplicationException`

    - #### fromJSON

          public static Object[] fromJSON(org.apache.wink.json4j.JSONObject jsonObject,
                          Class<?> beanClass)
                                   throws DatatypeConfigurationException,
                                          IllegalAccessException,
                                          IllegalArgumentException,
                                          InstantiationException,
                                          InvocationTargetException,
                                          OslcCoreApplicationException,
                                          URISyntaxException

      Throws:
        `DatatypeConfigurationException`
        `IllegalAccessException`
        `IllegalArgumentException`
        `InstantiationException`
        `InvocationTargetException`
        `OslcCoreApplicationException`
        `URISyntaxException`

    - #### addExtendedProperties

          protected static void addExtendedProperties(Map<String,String> namespaceMappings,
                                   Map<String,String> reverseNamespaceMappings,
                                   org.apache.wink.json4j.JSONObject jsonObject,
                                   IExtendedResource extendedResource,
                                   Map<String,Object> properties,
                                   Map<Object,org.apache.wink.json4j.JSONObject> visitedObjects)
                                               throws org.apache.wink.json4j.JSONException,
                                                      DatatypeConfigurationException,
                                                      IllegalAccessException,
                                                      InvocationTargetException,
                                                      OslcCoreApplicationException

      Throws:
        `org.apache.wink.json4j.JSONException`
        `DatatypeConfigurationException`
        `IllegalAccessException`
        `InvocationTargetException`
        `OslcCoreApplicationException`

    - #### handleResourceReference

          protected static org.apache.wink.json4j.JSONObject handleResourceReference(Map<String,String> namespaceMappings,
                                                                  Map<String,String> reverseNamespaceMappings,
                                                                  Class<?> resourceClass,
                                                                  Method method,
                                                                  URI uri)
                                                                              throws OslcCoreRelativeURIException,
                                                                                     org.apache.wink.json4j.JSONException

      Throws:
        `OslcCoreRelativeURIException`
        `org.apache.wink.json4j.JSONException`

    - #### addAboutURI

          protected static void addAboutURI(org.apache.wink.json4j.JSONObject jsonObject,
                         Map<String,String> namespaceMappings,
                         Map<String,String> reverseNamespaceMappings,
                         Class<? extends Object> objectClass,
                         URI aboutURI)
                                     throws OslcCoreRelativeURIException,
                                            org.apache.wink.json4j.JSONException

      Throws:
        `OslcCoreRelativeURIException`
        `org.apache.wink.json4j.JSONException`

    - #### fillInRdfType

          protected static void fillInRdfType(String rdfPrefix,
                           org.apache.wink.json4j.JSONObject jsonObject,
                           IExtendedResource resource)
                                       throws URISyntaxException

      Throws:
        `URISyntaxException`

Copyright © 2016. All rights reserved.