| ▲ | sevensor 3 days ago | |||||||||||||||||||||||||||||||||||||
I don’t wish to pick on this post, it looks quite well done. However, in general, I have some doubts about data formats with typed primitives. JSON, TOML, ASN.1, what have you. There’s very little you can do with the data unless you apply a schema, so why decode before then? The schema tells you what type you need anyway, so why add syntax complexity if you have to double check the result of parsing? | ||||||||||||||||||||||||||||||||||||||
| ▲ | zzo38computer 3 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
I think it depends what you will intend to do with the data (which is true for all of the formats that you mentioned); not everyone will do the same thing with it even if it is the same file. It might be helpful to know from other programs that do not know this schema to be able to parse the data (not always the case when using IMPLICIT types in ASN.1, which is one reason to use EXPLICIT instead, although it has avantages and disadvantages compared with IMPLICIT; however, in DER all types will use the same framing allowing the framing to be parsed even if the specific type cannot be understood by the reader), and can also be used in case the schema is later extended to use types other than the ones that were originally expected. (I prefer to use ASN.1 DER in my stuff, although JSON and other formats are also used by other formats that were made by someone else) | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | delaguardo 3 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
I can do a lot without applying schema at all. For that I only need handful of types defined in EDN specification and Clojure programming language. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||