MCPcopy Create free account
hub / github.com/apache/solr / toJSON

Method toJSON

solr/solrj/src/java/org/apache/solr/common/util/Utils.java:243–248  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

241 if (o == null) return new byte[0];
242 CharArr out = new CharArr();
243 new JSONWriter(out, JSONWriter.DEFAULT_INDENT).write(o); // indentation by default
244 return toUTF8(out);
245 }
246
247 /**
248 * @param indentSize The number of space characters to use as an indent. 0=newlines but no spaces,
249 * -1=no indent at all.
250 */
251 public static byte[] toJSON(Object o, int indentSize) {

Callers 15

buildZooKeeperMethod · 0.95
distribSetUpMethod · 0.95
testBasicAuthMethod · 0.95
testStoreAndReadMethod · 0.95
buildClusterStateMethod · 0.95
testDefaultSliceStateMethod · 0.95
getConfigSetPropsMethod · 0.95
testBasicMethod · 0.95
issueCreateJobMethod · 0.95

Calls 2

toUTF8Method · 0.95
writeMethod · 0.65

Tested by 15

buildZooKeeperMethod · 0.76
distribSetUpMethod · 0.76
testBasicAuthMethod · 0.76
testStoreAndReadMethod · 0.76
buildClusterStateMethod · 0.76
testDefaultSliceStateMethod · 0.76
getConfigSetPropsMethod · 0.76
testBasicMethod · 0.76
issueCreateJobMethod · 0.76