# Class CustomizeJsonParser (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.json.CustomizeJsonParser)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.json.CustomizeJsonParser)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.json.CustomizeJsonParser)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.json.CustomizeJsonParser)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.json.CustomizeJsonParser)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.json.CustomizeJsonParser)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.json.CustomizeJsonParser)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.json.CustomizeJsonParser)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.json.CustomizeJsonParser)

    public class CustomizeJsonParser

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Customizes the behavior of a JSON parser.

All methods have a default trivial implementation, so subclasses need only implement the
methods whose behavior needs customization.

Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily
thread-safe.

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> CustomizeJsonParser

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Constructors

### CustomizeJsonParser()

    public CustomizeJsonParser()

## Methods

### handleUnrecognizedKey(Object context, String key)

    public void handleUnrecognizedKey(Object context, String key)

Called when the given unrecognized key is encountered in the given context object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `context` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

### newInstanceForArray(Object context, Field field)

    public Collection<Object> newInstanceForArray(Object context, Field field)

Returns a new instance value for the given field in the given context object for a JSON array
or `null` for the default behavior.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `context` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |
| `field` | `https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html>` |   |

### newInstanceForObject(Object context, Class\<?\> fieldClass)

    public Object newInstanceForObject(Object context, Class<?> fieldClass)

Returns a new instance value for the given field class in the given context object for JSON
Object or `null` for the default behavior.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `context` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |
| `fieldClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<?>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |   |

### stopAt(Object context, String key)

    public boolean stopAt(Object context, String key)

Returns whether to stop parsing at the given key of the given context object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `context` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |