Запись JSON

Формат данных JSON умеет записывать JSON в строку (String) или в объект Writer.

Запись в строку

import static io.openbpm.spin.Spin.JSON;

SpinJsonNode jsonNode = JSON("{\"customer\": \"Kermit\"}");

String json = jsonNode.toString();

Запись в Writer

import static io.openbpm.spin.Spin.JSON;

SpinJsonNode jsonNode = JSON("{\"customer\": \"Kermit\"}");

StringWriter writer = new StringWriter();
jsonNode.writeToWriter(writer);

Документация создана на основе Camunda 7 Docs (Camunda, docs.camunda.org) и распространяется по лицензии Creative Commons Attribution-ShareAlike 3.0 Unported.