# Lenient JSON Deserialization Discusses FTL directive syntax alternatives to enable this behavior. `ignore-unknown-fields` `allow-extra-fields` `lenient` `lenient-request` `json-lenient` 1. On Verb, inlined with `ftl:ingress` directive ```go //ftl:ingress http POST /users ignore-unknown-fields func Post(ctx context.Context, req builtin.HttpRequest[PostRequest]) (builtin.HttpResponse[PostResponse, string], error) { } ``` 2. On Verb, as it's own `ftl:json` directive ```go //ftl:ingress http POST /users //ftl:json ignore-unknown-fields func Post(ctx context.Context, req builtin.HttpRequest[PostRequest]) (builtin.HttpResponse[PostResponse, string], error) { } ``` 3. On Data, inlined with `ftl:data` directive ```go //ftl:data ignore-unknown-fields type Foo struct {} ``` 4. On Data, as it's own `ftl:json` directive ```go //ftl:data //ftl:json ignore-unknown-fields type Foo struct {} // or, when `ftl:data` is transitively implied and can be omitted: //ftl:json ignore-unknown-fields type Foo struct {} ``` ### Proposal `ftl:json` as its own directive, supported above ingress verbs (option 2). Using `ignore-unknown-fields`.
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up