#sharpobject - nested documents

1 messages · Page 1 of 1 (latest)

wind coral
#

Hi, can you clarify and add more details?

edgy karma
#

There's no standardized way of url-encoding a nested document. The examples provide some insight but are incomplete. For example, a new array element can apparently be indicated using array_name[], but if the array element itself is an array or dictionary, it's unclear when array_name[] stops referring to the previously-inserted array element in array_name and begins referring to a new one.

For example, in this string: array_name[][hi]=1&array_name[][hi]=2 is the length of array_name 1 or 2?

onyx silo
#

array_name would have a length of 2 here

#

What are you really trying to do? Why are you URL encoding exactly instead of using our official libraries?

#

cc @edgy karma ^

edgy karma
#

no zig library

#

why do you expose an HTTP API and publish examples of invoking it using curl (but never with any arrays of dicts) if users are only intended to use your official libraries?

onyx silo
#

@edgy karma I never said you had to use it? I asked the why since most people in your situation asking questions like this are purely fiddling with curl and have no plans to not use client libraries

#

Ultimately, it all just works, so what's the blocker exactly? What we recommend is to always be explicit with the arrays and use zero-index notations to avoid any problem/mistake

edgy karma
#

I mean, I will use a client library, but to make one I would like to know what format I'm encoding. Sure, zero-indexed arrays are fine. That answers my question.

onyx silo
#

👍

onyx silo
#

@edgy karma anything else I can help with about the structure of our API?

edgy karma
#

all good ty