google / google/gson

Default Value for Missing fields in Json

Open
#1,005 8 comments 36 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

I know, We can achieve this by just setting up the field with the expected value, but people may not always remember that. Can Gson provide us with some mechanism of handling the fields which are not present in JSON?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.