• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
0 Comments Favorite Copy Link Share

JSON Key Rename Online

TAG json

Input JSON

Output JSON

JSON Key Rename Online-summary

Online JSON key renaming tool, supports renaming keys of input JSON data, supports lowerCamelCase,UpperCamelCase,lowercase,UPPERCASE,lower_snake_case,UPPER_SNAKE_CASE,kebab-case, There are various renaming methods such as custom renaming rules. Support adding prefixes or suffixes to keys and setting rules for handling key name conflicts.

JSON Key Rename Online-instructions
  1. Input JSON : Input the JSON data to be processed. The key of the inputting JSON data will be renamed. Support inputting any valid JSON data.
  2. Input Case : Naming convention for keys in input JSON data. The input naming convention determines how to split the words of each part of the key. This tool supports the following input naming conventions:
    1. lowerCamelCase : For example id, bindAddress
    2. UpperCamelCase : For example Id, BindAddress
    3. lowercase : For example id, bindaddress
    4. UPPERCASE : For example ID, BINDADDRESS
    5. lower_snake_case : For example id, bind_address
    6. UPPER_SNAKE_CASE : For example ID, BIND_ADDRESS
    7. kebab-case : For example id, bind-address
    8. raw key : Do not perform word splitting on JSON keys, that is, treat the entire JSON key as a single word.
  3. Output Case : After renaming, the naming convention for JSON keys. The output naming convention supports all input naming convention types, with additional support for the following types:
    1. Custom : The renaming mapping of custom JSON keys will keep the key names unchanged if they are not in the mapping. Renaming a mapping requires inputting mapping rules in JSON format, where the JSON key is the JSON path of the original key and the JSON value is the name of the new key. For example input json data {"id":1,"iD":2,"Id":3,"ID":4}, Key Rename Map {"$.id":"id1","$.iD":"id2","$.Id":"id3","$.ID":"id4"}, the output json result is {"id1":1,"id2":2,"id3":3,"id4":4}. Array support [arrayIndex], [*]. The two forms of representation that cannot be mixed. For example input json data {"data":[{"id":1},{"id":2}]}, Key Rename Map {"$.data.[0].id":"ID"}, rename the first id to ID. Key Rename Map {"$.data.[*].id":"ID"}, Rename all id to ID.
  4. Conflict : When there is a conflict between the renamed keys, choose how to handle the conflict. This tool supports the following conflict resolution strategies:
    1. Report Error : Display error messages for conflicts.
    2. Skip Rename : Do not rename the key, keep the original key unchanged. If there is a conflict between the original key and other renamed keys, an error will be reported.
    3. Add Suffix : Add a numerical suffix to the conflict key after renaming. For example, newKey_1.
    4. Override Exists : After renaming, only one conflicting key is retained, and the last value is used to override all values.
  5. Prefix : Add a prefix to the newly renamed key. Default is empty.
  6. Suffix : Add a suffix to the newly renamed key. Default is empty.
  7. Open : Open the JSON file and support file encoding as UTF-8.
  8. Format : Format input JSON data and output JSON results.
  9. Compress : Compress input JSON data and output JSON results.
  10. Copy : Copy json result.
  11. Download : Download JSON results with UTF-8 encoding for the downloaded file.
  12. Example : Using example data to demonstrate renaming processing.