home.social

#jsonpatch — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #jsonpatch, aggregated by home.social.

  1. Just started a new project, `betterer-json`. It's like JSON Patch, except it's javascript.

    You write your script match like a JSON Patch - use JSONPath to select values to process, each value is sent to a callback, and its result is put back in the JSON document.

    This example changes '"format": "datetime"' to '"format": "date-time"' across json document

    ```
    replace('$..format', value => {
    if(value === 'datetime')
    return 'date-time';
    return value
    })
    ```

    github.com/python-lapidary/bet

    #typeScript #javaScript #JSon #JSonPath #JSonPatch #programming