Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO0412

Docs

XO0412: empty wire name

error · reported by the checker

A field’s wire name (name as "key": T) is its JSON key or SqlRow column and cannot be empty. Write the key, or leave out as to use the field’s name. See core 2.2.

Example

struct User {
  name as "": Str
} derive Json

Fix

struct User {
  name: Str
} derive Json

Run xo explain XO0412 for this text in a terminal, or see section 10.6 of the specification.