| |
| ▲ | crote 3 days ago | parent | next [-] | | Like this: {
'schema': 'c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2',
'data': []
}
| | |
| ▲ | phailhaus 3 days ago | parent [-] | | And there you go, just `[]` is no longer valid, so you need a new format. | | |
| ▲ | ltbarcly3 3 days ago | parent [-] | | If you need a schema for [] you have lost the plot. | | |
| ▲ | hyperhello 3 days ago | parent | next [-] | | Well, you could be annotating type that the array is for. | | | |
| ▲ | phailhaus 2 days ago | parent | prev | next [-] | | 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. | | |
|
| |
| ▲ | 2 days ago | parent | prev [-] | | [deleted] |
|
|
| |
| ▲ | flanked-evergl 2 days ago | parent | prev [-] | | If you need to embed the schema in the document, Don't design your schema in way that makes it impossible to embed the schema in the document. [1]: https://json-schema.org/learn/miscellaneous-examples |
|