For a clean solution, try `pydantic` with `parse_obj_as`. Define a model with just the fields you need, and it’ll ignore the rest:
```python
from pydantic import BaseModel
class MyModel(BaseModel):
needed_field: str
data = MyModel.parse_raw(json_blob) # Automatically drops extras
```
Not *quite* `python jsondecoder omit fields`, but super tidy for structured data.
```python
from pydantic import BaseModel
class MyModel(BaseModel):
needed_field: str
data = MyModel.parse_raw(json_blob) # Automatically drops extras
```
Not *quite* `python jsondecoder omit fields`, but super tidy for structured data.
