3 ms·
And there you go, just `[]` is no longer valid, so you need a new format.
by phailhaus 3mo ago
And there you go, just `[]` is no longer valid, so you need a new format.
- ltbarcly3 3mo agoIf you need a schema for [] you have lost the plot.
- hyperhello 3mo agoWell, you could be annotating type that the array is for.
- inigyou 3mo agoIt's the schema's root type, obviously.
- IncreasePosts 3mo agoWhat record types are valid to add to that array?
- inigyou 3mo agoDon't ask me, ask the schema.
- deleted 3mo ago[deleted]
- phailhaus 3mo agoAre 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 3mo agoI assumed you meant empty list because that made sense. What you said here does not make sense.
- phailhaus 3mo agoThat'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 3mo agoOh guilty as charged, thank you for explaining it.