@Override
  public String getText() throws JsonParseException {
    final JsonToken token = currentToken();
    if (token == JsonToken.FIELD_NAME || type() == null) {
      // return current field name
      return context.fieldName;
    } else if (token == JsonToken.VALUE_NULL || token == JsonToken.VALUE_TRUE || token == JsonToken.VALUE_FALSE) {
      return token.asString();
    }

    if (context.hasValue()) {
      return context.valueAsString();
    }

    readValue();
    return context.valueAsString();
  }
Read next token in the stream
criteria/mongo/src/org/immutables/criteria/mongo/bson4jackson/BsonParser.java