class SyntaxTree::LanguageServer::InlayHints::Hint

def to_json(*opts)

This is the shape that the LSP expects.
def to_json(*opts)
  {
    position: {
      line: line,
      character: character
    },
    label: label
  }.to_json(*opts)
end