(defcomp
  ()
  (~examples/page-content
    :title "JSON Encoding"
    :description "Use sx-encoding=\"json\" to send form data as a JSON body instead of URL-encoded form data. The server echoes back what it received."
    :demo-description "Submit the form and see the JSON body the server received."
    :demo (~examples/json-encoding-demo)
    :sx-code "(form\n  :sx-post \"/sx/(geography.(hypermedia.(example.(api.json-echo))))\"\n  :sx-target \"#json-result\"\n  :sx-swap \"innerHTML\"\n  :sx-encoding \"json\"\n  (input :name \"name\" :value \"Ada\")\n  (input :type \"number\" :name \"age\" :value \"36\")\n  (button \"Submit as JSON\"))"
    :handler-names (list "ex-json-echo")
    :comp-placeholder-id "json-comp"
    :wire-placeholder-id "json-wire"))
