Package org.apache.sling.maven.bundlesupport

# Class JsonSupport

java.lang.Object
org.apache.sling.maven.bundlesupport.JsonSupport

public final class JsonSupport extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`JSON_MIME_TYPE`
Mime type for json response.

## Method Summary

Modifier and Type
Method
Description
`static void`
`accumulate(Map<String,Object> obj, String name, String value)`
`static jakarta.json.JsonArray`
`parseArray(String jsonString)`
Parse String to JSON array.
`static jakarta.json.JsonObject`
`parseObject(String jsonString)`
Parse String to JSON object.
`static jakarta.json.JsonObject`
`toJson(Map<String,Object> map)`
`static void`
`validateJsonStructure(String jsonString, boolean tickToDoubleQuote)`
Validate JSON structure

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

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

## Field Details

### JSON_MIME_TYPE

public static final String JSON_MIME_TYPE
Mime type for json response.

See Also:
  - Constant Field Values

## Method Details

### parseObject

public static jakarta.json.JsonObject parseObject(String jsonString)
Parse String to JSON object.

Parameters:
  `jsonString` - JSON string
Returns:
  JSON object

### parseArray

public static jakarta.json.JsonArray parseArray(String jsonString)
Parse String to JSON array.

Parameters:
  `jsonString` - JSON string
Returns:
  JSON array

### validateJsonStructure

public static void validateJsonStructure(String jsonString, boolean tickToDoubleQuote)
Validate JSON structure

Parameters:
  `jsonString` - JSON string
  `tickToDoubleQuote` - Tick to double quote
Throws:
  `jakarta.json.JsonException` - when JSON structure is invalid

### accumulate

public static void accumulate(Map<String,Object> obj, String name, String value)

### toJson

public static jakarta.json.JsonObject toJson(Map<String,Object> map)