Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

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()