MCPcopy
hub / github.com/OpenTSDB/opentsdb / serializeToString

Method serializeToString

src/utils/JSON.java:273–281  ·  view source on GitHub ↗

Serializes the given object to a JSON string @param object The object to serialize @return A JSON formatted string @throws IllegalArgumentException if the object was null @throws JSONException if the object could not be serialized

(final Object object)

Source from the content-addressed store, hash-verified

271 * @throws JSONException if the object could not be serialized
272 */
273 public static final String serializeToString(final Object object) {
274 if (object == null)
275 throw new IllegalArgumentException("Object was null");
276 try {
277 return jsonMapper.writeValueAsString(object);
278 } catch (JsonProcessingException e) {
279 throw new JSONException(e);
280 }
281 }
282
283 /**
284 * Serializes the given object to a JSON byte array

Callers 15

serdesMethod · 0.95
serdesNullsMethod · 0.95
serdesListMethod · 0.95
serializeToStringMethod · 0.95
serializeToStringNullMethod · 0.95
serializeToBytesNullMethod · 0.95
serdesMethod · 0.95
serdesMethod · 0.95
serdesMethod · 0.95
serializeMethod · 0.95
serializeMethod · 0.95
serializeMethod · 0.95

Calls

no outgoing calls

Tested by 15

serdesMethod · 0.76
serdesNullsMethod · 0.76
serdesListMethod · 0.76
serializeToStringMethod · 0.76
serializeToStringNullMethod · 0.76
serializeToBytesNullMethod · 0.76
serdesMethod · 0.76
serdesMethod · 0.76
serdesMethod · 0.76
serializeMethod · 0.76
serializeMethod · 0.76
serializeMethod · 0.76