Lines Matching defs:operation
761 cJSON *operation = get_object_item(patch, "op", case_sensitive);
762 if (!cJSON_IsString(operation))
767 if (strcmp(operation->valuestring, "add") == 0)
772 if (strcmp(operation->valuestring, "remove") == 0)
777 if (strcmp(operation->valuestring, "replace") == 0)
782 if (strcmp(operation->valuestring, "move") == 0)
787 if (strcmp(operation->valuestring, "copy") == 0)
792 if (strcmp(operation->valuestring, "test") == 0)
1113 static void compose_patch(cJSON * const patches, const unsigned char * const operation, const unsigned char * const path, const unsigned char *suffix, const cJSON * const value)
1117 if ((patches == NULL) || (operation == NULL) || (path == NULL))
1127 cJSON_AddItemToObject(patch, "op", cJSON_CreateString((const char*)operation));
1153 CJSON_PUBLIC(void) cJSONUtils_AddPatchToArray(cJSON * const array, const char * const operation, const char * const path, const cJSON * const value)
1155 compose_patch(array, (const unsigned char*)operation, (const unsigned char*)path, NULL, value);