News for hackers. Stuff that matters.
Re:The YAML Document from Hell by bogwog on Thursday January 12, 2023 @11:06AM (#34355595)

    {
        “/*These are the ports we use”: “*/”,
        “ports”: [22, 80, 443]
    }
Re:The YAML Document from Hell by ok123456 on Thursday January 12, 2023 @12:02PM (#34356746)
Now, write a json-schema for that.
Re:The YAML Document from Hell by dtech on Thursday January 12, 2023 @12:39PM (#34357439)
Can be done by either additionalProperties: true and not specifying the property, or "patternProperties": { "^/\*": { "type": "string" }}.
Re:The YAML Document from Hell by ok123456 on Thursday January 12, 2023 @02:58PM (#34359444)
I'd rather have real comments than this epicycle.
Re:The YAML Document from Hell by nawgz on Thursday January 12, 2023 @12:56PM (#34357719)
"additionalProperties": true
Re:The YAML Document from Hell by deterministic on Friday January 13, 2023 @07:13PM (#34375745)
“Comment”: ”This is a comment that is optional and ignored by code”
Re:The YAML Document from Hell by zvr on Sunday January 15, 2023 @06:40AM (#34388681)
"Comment": "but you can only have one per object"
Re:The YAML Document from Hell by deterministic on Monday January 16, 2023 @02:45AM (#34397997)
"Comment1": "This is the first comment"

"Comment2": "This is the next comment"

or

"Comments": ["Here is one", "Here is another!"]

or

"Comments": { "Name": "This is the name of the customer", "Age": "This is the age (0 to 1000) of the customer" }

or

"Values": [ {"Name":"Age", "Value":"20", "Comment":"This is the age of the customer"}, {"Name":"Name", "Value":"Mr. Foo Bar", "Comment":"This is the name of the customer"} ]

The only limit is your imagination.