Codota Logo
ObjectNode.arrayNode
Code IndexAdd Codota to your IDE (free)

How to use
arrayNode
method
in
org.codehaus.jackson.node.ObjectNode

Best Java code snippets using org.codehaus.jackson.node.ObjectNode.arrayNode (Showing top 13 results out of 315)

  • Common ways to obtain ObjectNode
private void myMethod () {
ObjectNode o =
  • Codota IconJsonNodeFactory instance;instance.objectNode()
  • Codota IconObjectMapper mapper;mapper.createObjectNode()
  • Codota IconArrayNode arrayNode;arrayNode.addObject()
  • Smart code suggestions by Codota
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method that will construct an ArrayNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ArrayNode (NOT the old value,
 *   which could be of any type)
 */
public ArrayNode putArray(String fieldName)
{
  ArrayNode n  = arrayNode();
  _put(fieldName, n);
  return n;
}
origin: camunda/camunda-bpm-platform

/**
 * Method that will construct an ArrayNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ArrayNode (NOT the old value,
 *   which could be of any type)
 */
public ArrayNode putArray(String fieldName)
{
  ArrayNode n  = arrayNode();
  _put(fieldName, n);
  return n;
}
origin: org.codehaus.jackson/jackson-mapper-lgpl

/**
 * Method that will construct an ArrayNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ArrayNode (NOT the old value,
 *   which could be of any type)
 */
public ArrayNode putArray(String fieldName)
{
  ArrayNode n  = arrayNode();
  _put(fieldName, n);
  return n;
}
origin: com.barchart.wrap/barchart-wrap-jackson

/**
 * Method that will construct an ArrayNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ArrayNode (NOT the old value,
 *   which could be of any type)
 */
public ArrayNode putArray(String fieldName)
{
  ArrayNode n  = arrayNode();
  _put(fieldName, n);
  return n;
}
origin: ovea-deprecated/jetty-session-redis

/**
 * Method that will construct an ArrayNode and add it as a
 * field of this ObjectNode, replacing old value, if any.
 *
 * @return Newly constructed ArrayNode (NOT the old value,
 *   which could be of any type)
 */
public ArrayNode putArray(String fieldName)
{
  ArrayNode n  = arrayNode();
  _put(fieldName, n);
  return n;
}
origin: inspectIT/inspectIT

@Test
public void testIDAssignment() throws JsonProcessingException, IOException {
  ObjectNode beacon = new ObjectNode(JsonNodeFactory.instance);
  beacon.put("sessionID", "" + Long.toString(Beacon.REQUEST_NEW_SESSION_ID_MARKER, 16));
  beacon.put("tabID", "" + Long.toString(Beacon.REQUEST_NEW_TAB_ID_MARKER, 16));
  beacon.put("activeAgentModules", MODULES_DEMOVALUE);
  ArrayNode data = beacon.arrayNode();
  beacon.put("data", data);
  String beaconJson = beacon.toString();
  String responseJson = dataHandler.insertBeacon(beaconJson);
  Mockito.verify(coreService, Mockito.times(0)).addDefaultData(any(DefaultData.class));
  JsonNode response = (new ObjectMapper()).readTree(responseJson);
  assertThat(response, instanceOf(ObjectNode.class));
  assertThat(response.get("sessionID").asText(), notNullValue());
  assertThat(response.get("tabID").asText(), notNullValue());
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
protected JsonNode toJsonNode() {
 final ObjectNode root = JsonNodeFactory.instance.objectNode();
 root.put(OPERATOR_NODE, mOperator.name());
 final ArrayNode filters = root.arrayNode();
 for (FijiRowFilter filter : mFilters) {
  if (filter != null) {
   filters.add(filter.toJson());
  }
 }
 root.put(FILTERS_NODE, filters);
 return root;
}
origin: inspectIT/inspectIT

@Test
public void testSessionInfoSending() {
  ObjectNode beacon = new ObjectNode(JsonNodeFactory.instance);
  ObjectNode sessInfo = new ObjectNode(JsonNodeFactory.instance);
  sessInfo.put("type", "metaInfo");
  sessInfo.put("browser", "Firefox");
  sessInfo.put("device", "iOS");
  sessInfo.put("language", "de");
  beacon.put("sessionID", "" + Long.toString(SESSID_DEMOVALUE, 16));
  beacon.put("tabID", "" + Long.toString(TABID_DEMOVALUE, 16));
  beacon.put("activeAgentModules", MODULES_DEMOVALUE);
  ArrayNode data = beacon.arrayNode();
  beacon.put("data", data);
  data.add(sessInfo);
  String beaconJson = beacon.toString();
  dataHandler.insertBeacon(beaconJson);
  Mockito.verify(coreService, Mockito.times(1)).addDefaultData(any(DefaultData.class));
  List<DefaultData> sent = sentElements.getAllValues();
  assertThat(sent.size(), equalTo(1));
  assertThat(sent.get(0), instanceOf(UserSessionInfo.class));
  UserSessionInfo sentInfo = (UserSessionInfo) sent.get(0);
  assertThat(sentInfo.getBrowser(), equalTo("Firefox"));
  assertThat(sentInfo.getDevice(), equalTo("iOS"));
  assertThat(sentInfo.getLanguage(), equalTo("de"));
  assertThat(sentInfo.getSessionId(), equalTo(SESSID_DEMOVALUE));
}
origin: de.mhus.lib/mhu-lib-core

ArrayNode array = to.arrayNode();
to.put(name, array);
for (Object o : (Object[])value) {
ArrayNode array = to.arrayNode();
to.put(name, array);
for (Object o : ((Collection<Object>)value)) {
origin: de.mhus.lib/mhu-lib-core

ArrayNode array = to.arrayNode();
to.put("array", array);
for (Object i : (Object[])from) {
ArrayNode array = to.arrayNode();
to.put("_collection", array);
for (Object o : obj) {
  else
  if (value instanceof String[]) {
    ArrayNode array = to.arrayNode();
    to.put(name, array);
    for (String i : (String[])value)
  } else
  if (value instanceof Object[]) {
    ArrayNode array = to.arrayNode();
    to.put(name, array);
    for (Object i : (Object[])value) {
  if (value instanceof Collection) {
    Collection<?> obj = (Collection<?>)value;
    ArrayNode array = to.arrayNode();
    to.put(name, array);
    for (Object o : obj) {
origin: de.mhus.lib/mhu-lib-core

ArrayNode array = node.arrayNode();
node.put(name, array);
setValues(array, (Object[])value, level);
ArrayNode array = node.arrayNode();
node.put(name, array);
setValues(array, (Collection<?>)value, level);
origin: inspectIT/inspectIT

  @Test
  public void testInvalidBeaconContent() {
    ObjectNode beacon = new ObjectNode(JsonNodeFactory.instance);
    ObjectNode sessInfo = new ObjectNode(JsonNodeFactory.instance);
    sessInfo.put("type", "unkownType");
    sessInfo.put("browser", "Firefox");
    sessInfo.put("device", "iOS");
    sessInfo.put("language", "de");
    beacon.put("sessionID", "" + Long.toString(SESSID_DEMOVALUE, 16));
    beacon.put("tabID", "" + Long.toString(TABID_DEMOVALUE, 16));
    beacon.put("activeAgentModules", MODULES_DEMOVALUE);
    ArrayNode data = beacon.arrayNode();
    beacon.put("data", data);
    data.add(sessInfo);
    String beaconJson = beacon.toString();
    dataHandler.insertBeacon(beaconJson);
    Mockito.verify(coreService, Mockito.times(0)).addDefaultData(any(DefaultData.class));
  }
}
origin: de.mhus.lib/mhu-lib-core

@Override
public WritableResourceNode<IConfig> createConfig(String key) throws MException {
  
  // find array node, to append new config
  if (node.get(key) != null && !node.get(key).isArray()) {
    node.remove(key);
  }
  ArrayNode array = (ArrayNode) node.get(key);
  if (array == null) { 					// if not, create one
    array = node.arrayNode();
    node.put(key, array);
    
  }
  
  if (! (array instanceof ArrayNode) ) {
    throw new MException(key + " is not an array");
  }
  
  // create new object node in array
  ObjectNode out = array.objectNode();
  array.add(out);
  
  return new JsonConfig(key, this, out);
}
org.codehaus.jackson.nodeObjectNodearrayNode

Popular methods of ObjectNode

  • put
    Method for setting value of a field to specified binary value
  • get
  • getFields
    Method to use for accessing all fields (with both names and values) of this JSON Object.
  • toString
  • putArray
    Method that will construct an ArrayNode and add it as a field of this ObjectNode, replacing old valu
  • has
  • remove
    Method for removing specified field properties out of this ObjectNode.
  • objectNode
  • size
  • <init>
  • putObject
    Method that will construct an ObjectNode and add it as a field of this ObjectNode, replacing old val
  • nullNode
  • putObject,
  • nullNode,
  • path,
  • putNull,
  • POJONode,
  • _put,
  • binaryNode,
  • booleanNode,
  • equals

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
  • addToBackStack (FragmentTransaction)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • JTextField (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now