• sonnenzeit@feddit.de
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    It’s so dumb that JSON doesn’t officially have comments.

    So much this.

    Used to work at a company where I sometimes had to manually edit the configuration of devices which were written and read in JSON. Super inconvenient if you have to document all changes externally. As a “hack” I would sometimes add extra objects to store strings (the comments). But that’s super dicey as you don’t know if it somehow breaks the parsing. You’re also not guaranteed the order of objects so if the configuration gets read, edited and rewritten your comment might no longer be above/below the change you made.

    Always found it baffling that such a basic feature is missing from a spec that is supposed to cover a broad range of use cases.