Class JsonUtils


  • public abstract class JsonUtils
    extends Object
    Factory class for creating ObjectMapper
    • Constructor Detail

      • JsonUtils

        public JsonUtils()
    • Method Detail

      • createObjectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()
      • getBasicApiJsonSchema

        public static String getBasicApiJsonSchema()
                                            throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getJsonSchemaString

        public static String getJsonSchemaString​(com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                 Set<com.fasterxml.jackson.module.jsonSchema.JsonSchema> allSchemas,
                                                 String id)
                                          throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getJsonSchemaAsSchema

        public static com.fasterxml.jackson.module.jsonSchema.JsonSchema getJsonSchemaAsSchema​(Set<com.fasterxml.jackson.module.jsonSchema.JsonSchema> allSchemas,
                                                                                               String id)
      • getSObjectJsonSchema

        public static String getSObjectJsonSchema​(SObjectDescription description)
                                           throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getSObjectJsonSchemaAsJson

        public static com.fasterxml.jackson.module.jsonSchema.JsonSchema getSObjectJsonSchemaAsJson​(SObjectDescription description)
                                                                                             throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getSObjectJsonSchema

        public static String getSObjectJsonSchema​(SObjectDescription description,
                                                  boolean addQuerySchema)
                                           throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getSObjectJsonSchemaAsSchema

        public static com.fasterxml.jackson.module.jsonSchema.JsonSchema getSObjectJsonSchemaAsSchema​(SObjectDescription description,
                                                                                                      boolean addQuerySchema)
                                                                                               throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • getSObjectJsonSchema

        public static Set<com.fasterxml.jackson.module.jsonSchema.JsonSchema> getSObjectJsonSchema​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                                                                   SObjectDescription description,
                                                                                                   String idPrefix,
                                                                                                   boolean addQuerySchema)
                                                                                            throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • createSchemaObjectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper createSchemaObjectMapper()
      • getGlobalObjectsJsonSchemaAsSchema

        public static com.fasterxml.jackson.module.jsonSchema.JsonSchema getGlobalObjectsJsonSchemaAsSchema​(GlobalObjects globalObjects)
      • withNullSerialization

        public static com.fasterxml.jackson.databind.ObjectMapper withNullSerialization​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)