List of usage examples for com.fasterxml.jackson.core JsonToken VALUE_EMBEDDED_OBJECT
JsonToken VALUE_EMBEDDED_OBJECT
To view the source code for com.fasterxml.jackson.core JsonToken VALUE_EMBEDDED_OBJECT.
Click Source Link
From source file:de.undercouch.bson4jackson.BsonParser.java
/** * Reads a DBPointer from the stream// w w w .jav a 2 s.c om * @return the json token read * @throws IOException if an I/O error occurs */ protected JsonToken handleDBPointer() throws IOException { Map<String, Object> pointer = new LinkedHashMap<String, Object>(); pointer.put("$ns", readString()); pointer.put("$id", readObjectId()); getContext().value = pointer; return JsonToken.VALUE_EMBEDDED_OBJECT; }
From source file:de.undercouch.bson4jackson.BsonParser.java
/** * Can be called when embedded javascript code with scope is found. Reads * the code and the embedded document.//from w w w. java 2s.com * @return the json token read * @throws IOException if an I/O error occurs */ protected JsonToken handleJavascriptWithScope() throws IOException { //skip size _in.readInt(); String code = readString(); Map<String, Object> doc = readDocument(); getContext().value = new JavaScript(code, doc); return JsonToken.VALUE_EMBEDDED_OBJECT; }