You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Narrowed it down to a certain JSON structure with hx-ext="json-enc" and hx-vals='{"hello": [1,2,3]}'
Causes: TypeError: Converting circular structure to JSON --> starting at object with constructor 'Array' --- index 3 closes the circle
JSON.parse('{"hello": [1,2,3]}')works as intended JSON.stringify({"hello": [1,2,3]})works as intended
hx-vals='{"hello": {"world": [1,2,3]}}'
no issues
It seems that having an array in the first element causes problems. Workaround: hx-vals={"data": {_the actual object_}}
Why is this impossible:
<div hx-post="/update" hx-trigger='click' hx-vals='{"hello": [1,2,3], "world": {"beta": [1,2,3], "alpha": 1}}' hx-headers='{"Content-Type": "application/json"}' hx-encoding="application/json">Update</div>
It seems that a simple POST with a slightly complex JSON payload should not be this hard or am I missing something?
I have tried the
hx-ext="json-enc-custom"
but that doesn't seem to target this use-case.The text was updated successfully, but these errors were encountered: