XMLã®æä½ãæ¨æºåããç©ã¨ãã¦DOMããXPathããå種è¦æ ¼ãåå¨ããããã§ãããJSONã§ããã®ãããªããå©ç¨ãããæä½ãå ±éåããç©ãåå¨ããã¨ä¾¿å©ãªå ´é¢ãããããããã¾ããã
ããã§IETFã®appsawg WGã§ææ¡ããã¦ããã®ããJSON Pointerã¨JSON Patchã§ãã
ã¾ã ææ¡ãããã°ããã§ã»ã¨ãã©ä½ã決ã¾ã£ã¦ããªãã®ãå®æ ãªã®ã§ãããããRFCã¨ãã¦å ¬éãããã»ã©ã®ç©ãåºæ¥ä¸ããã°ãæ¨æºçãªæ çµã¿ã¨ãã¦ã¯å¼·åãªç©ã«ãªãããããã¾ããã
JSON Pointer
JSON Pointerã¯XMLã§è¨ãæã®XLinkã¨XPathã®æ©è½ãä½µãæã£ããããªç©ã§ãJSONã®æ§é ã®ä¸ã®ãããªãã¸ã§ã¯ãã表ãã®ã«ç¨ããããããURLä¸ã«ããã¦fragment identifierã¨ãã¦ä½¿ãããäºã§JSONã®æ§é ä¸ã®ç¹å®ã®ãªãã¸ã§ã¯ããæã示ãã®ã«ä½¿ãããäºãæ³å®ãã¦ãã¾ãã
JSON Patch
JSON Patchã¯ãJSONã§æ¸ãããææ¸ã«æ°ãã«ãªãã¸ã§ã¯ãã追å ããããåé¤ãããããçºã®ä»æ§ã§ããHTTPã®PATCHãªã¯ã¨ã¹ãã¨ä½µç¨ããã¨ãRESTfulã«JSONææ¸ã®æä½ãåºæ¥ãããã«ããäºãæ¨æºçãªæ çµã¿ã¨ãã¦åºæ¥ãããã«ãªãã¨ããäºãè¦è¾¼ã¾ãã¦ãã¾ãã
JSON Patchã§å®ç¾©ããã¦ããJSONææ¸ã®æä½ã«ã¯ãadd, remove, replace, move, testã®5ã¤ã®operationãå®ç¾©ããã¦ãã¾ããããããç°¡åã«è§£èª¬ãã¾ãã
- add
- JSON Pointerã§æå®ãããä½ç½®ã«æå®ããããªãã¸ã§ã¯ããæ¿å ¥ãã¾ãã
- remove
- JSON Pointerã§æå®ãããä½ç½®ã®ãªãã¸ã§ã¯ããåé¤ãã¾ãã
- replace
- JSON Pointerã§æå®ãããä½ç½®ã®ãªãã¸ã§ã¯ããæå®ããããªãã¸ã§ã¯ãã§ç½®ãæãã¾ãã
- move
- JSON Pointerã§æå®ãããä½ç½®ã®ãªãã¸ã§ã¯ãããããä¸ã¤ã®JSON Pointerã§æå®ãããä½ç½®ã«ç§»åãã¾ãã
- test
- JSON Pointerã§æå®ãããä½ç½®ã®ãªãã¸ã§ã¯ãããæå®ããããªãã¸ã§ã¯ãã¨åå¤ã§ãããã©ãããå¤å®ãã¾ãã