Remix.run Logo
phailhaus 2 days ago

Are you serious? Do you honestly think that I am talking about a schema for passing empty lists around?

If you are passing around lists of structured objects, I need you to send me what those objects are supposed to look like even if the list is empty sometimes. If you say "ok so sometimes I'll give you an object with a schema key and a list of data, other times I will just give you an empty list because I don't feel like it", everyone will hate you.

ltbarcly3 2 days ago | parent [-]

I assumed you meant empty list because that made sense. What you said here does not make sense.

phailhaus a day ago | parent [-]

That's because you're trying to snarkily jump into a conversation you don't understand.

User `flanked-evergl` is asking why do you need a whole new format for this instead of just using json. And the answer is because everyone needs to agree on how to specify the format in the json, which `crote` suggests is as simple as doing `{"schema": ..., "data": ...}`.

There's your format. If you want everyone to agree on the `{"schema": ..., "data": ...}` pattern, you can no longer accept just `[]` as a return type. Every response has to include the `schema` and `data` keys.

ltbarcly3 a day ago | parent [-]

Oh guilty as charged, thank you for explaining it.