d3rty/json 🧼 Demo

Model Definition
// Event is the demo model.
type Event struct {
    dirty.Enabled
    Name     string `json:"name"`
    ID       int    `json:"id"`
    IsActive bool   `json:"is_active"`
    MustBool bool   `json:"must_bool"`
}
Configuration
Bool
Number
FlexKeys
Dirty JSON Input
{
  "id": "100000",
  "Is_Active": "yes",
  "must_bool": 1,
  "Name": "hello World"
}
Clean JSON Output
{
  "name": "",
  "id": 0,
  "is_active": false,
  "must_bool": false
}