Java Code Examples for org.codehaus.jackson.JsonToken#asString()

The following examples show how to use org.codehaus.jackson.JsonToken#asString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientObjectMapper.java    From hraven with Apache License 2.0 4 votes vote down vote up
private static void assertToken(JsonToken found, JsonToken expected) {
  if (expected != found) {
    throw new IllegalStateException("Expecting JsonToken to be " + expected.asString() +
      ", but found JsonToken=" + found.asString());
  }
}
 
Example 2
Source File: ImportAdmins.java    From usergrid with Apache License 2.0 4 votes vote down vote up
private void validateStartArray(JsonToken token) {
    if (token != JsonToken.START_ARRAY) {
        throw new RuntimeException("Token should be START ARRAY but it is:" + token.asString());
    }
}
 
Example 3
Source File: Import.java    From usergrid with Apache License 2.0 4 votes vote down vote up
private void validateStartArray( JsonToken token ) {
    if ( token != JsonToken.START_ARRAY ) {
        throw new RuntimeException( "Token should be START ARRAY but it is:" + token.asString() );
    }
}