MCPcopy
hub / github.com/jOOQ/jOOQ / toJSONString

Method toJSONString

jOOQ/src/main/java/org/jooq/tools/json/JSONValue.java:164–173  ·  view source on GitHub ↗

Convert an object to JSON text. @see JSONObject#toJSONString(Map) @see JSONArray#toJSONString(List) @return JSON text, or "null" if value is null or it's an NaN or an INF number.

(Object value)

Source from the content-addressed store, hash-verified

162 * number.
163 */
164 public static String toJSONString(Object value) {
165 Writer w = new StringWriter();
166
167 try {
168 writeJSONString(value, w);
169 }
170 catch (IOException ignore) {}
171
172 return w.toString();
173 }
174
175 /**
176 * Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters

Callers 3

toJSONStringMethod · 0.95
toJSONStringMethod · 0.95
toJSONStringMethod · 0.95

Calls 2

writeJSONStringMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected