public static final class JSONParser.RawJson

  1. Object
  2. JSONParser.RawJson

Wrapper that lets a caller embed a pre-built JSON fragment into a Map/List tree being serialized by toJson(Object). The fragment is inlined verbatim rather than escaped as a string literal. Useful when a value (such as a JSON-Schema for a tool parameter) is already in canonical JSON form.

Map<String, Object> root = new HashMap<String, Object>();
root.put("parameters", JSONParser.rawJson(schema));
String body = JSONParser.toJson(root);

Methods

public String getJson()

Inherited methods

Method details

getJson

public String getJson()