MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / serializeJSON

Method serializeJSON

src/tsd/HttpJsonSerializer.java:1218–1225  ·  view source on GitHub ↗

Helper object for the format calls to wrap the JSON response in a JSONP function if requested. Used for code dedupe. @param obj The object to serialize @return A ChannelBuffer to pass on to the query @throws JSONException if serialization failed

(final Object obj)

Source from the content-addressed store, hash-verified

1216 * @throws JSONException if serialization failed
1217 */
1218 private ChannelBuffer serializeJSON(final Object obj) {
1219 if (query.hasQueryStringParam("jsonp")) {
1220 return ChannelBuffers.wrappedBuffer(
1221 JSON.serializeToJSONPBytes(query.getQueryStringParam("jsonp"),
1222 obj));
1223 }
1224 return ChannelBuffers.wrappedBuffer(JSON.serializeToBytes(obj));
1225 }
1226}

Callers 15

formatPutV1Method · 0.95
formatSuggestV1Method · 0.95
formatSerializersV1Method · 0.95
formatAggregatorsV1Method · 0.95
formatVersionV1Method · 0.95
formatDropCachesV1Method · 0.95
formatUidAssignV1Method · 0.95
formatUidRenameV1Method · 0.95
formatUidMetaV1Method · 0.95
formatTSMetaV1Method · 0.95
formatTSMetaListV1Method · 0.95

Calls 4

serializeToJSONPBytesMethod · 0.95
serializeToBytesMethod · 0.95
hasQueryStringParamMethod · 0.45
getQueryStringParamMethod · 0.45

Tested by

no test coverage detected