@Override
  public String getText() throws IOException {
    final BsonType type = type();
    if (type == BsonType.SYMBOL) {
      return reader.readSymbol();
    }
    if (type == BsonType.STRING) {
      return reader.readString();
    }

    throw new IllegalStateException(String.format("Bad BSON type: %s expected String or Symbol", type));
  }
The ObjectCodec used to parse the Bson object(s)
mongo/src/org/immutables/mongo/bson4jackson/BsonParser.java