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