Skip to content
Playground(another site)

bynk.http.json_invalid_arg

Error A @json annotation's options argument is missing or is not tagged or plain.

@json has one argument, options:, whose value is the bare word tagged or plain: tagged writes Option as {"kind": "Some", …} (the default), and plain writes Some(v) as v and None as null. The annotation is refused with no options, or with any other value. Write @json(options: plain) or @json(options: tagged). Another argument name is bynk.http.json_unknown_arg.

Example

@json(options: compact) // ✗ `tagged` or `plain`
on GET("/activity") () -> Effect[HttpResult[String]] by v: Visitor { … }
@json(options: plain) // ✓
on GET("/activity") () -> Effect[HttpResult[String]] by v: Visitor { … }

In the Book

See also

  • Every code in its category, HTTP, on the diagnostic index.
  • bynk explain bynk.http.json_invalid_arg shows the same from the installed toolchain, without a network.