diff --git a/frontend/src/components/JsonParser.vue b/frontend/src/components/JsonParser.vue index c8a7fa0..f2718d8 100644 --- a/frontend/src/components/JsonParser.vue +++ b/frontend/src/components/JsonParser.vue @@ -1,28 +1,32 @@ - - + + + {{ t('jsonparser.title') }} @@ -221,138 +240,37 @@ onUnmounted(() => { {{ t('jsonparser.section.result') }} - + + - - - {{ isExpanded('root') ? '▼' : '▶' }} - - {{ getValueType(parsedData) }} - - - Array[{{ parsedData.length }}] - - - - - - - {{ isExpanded(`root-${index}`) ? '▼' : '▶' }} - [{{ index }}] - - {{ getValueType(item) }} - - - {{ formatValue(item) }} - - - Array[{{ item.length }}] - - - Object{ {{ Object.keys(item).length }} } - - {{ t('jsonparser.btn.copy') }} - - - - - - [{{ subIndex }}] - - {{ getValueType(subItem) }} - - {{ formatValue(subItem) }} - - - - - - - {{ subKey }}: - - {{ getValueType(subValue) }} - - {{ formatValue(subValue) }} - - - - - - - - - - {{ isExpanded(`root-${key}`) ? '▼' : '▶' }} - {{ key }}: - - {{ getValueType(value) }} - - - {{ formatValue(value) }} - - - Array[{{ value.length }}] - - - Object{ {{ Object.keys(value).length }} } - - {{ t('jsonparser.btn.copy') }} - - - - - - [{{ subIndex }}] - - {{ getValueType(subItem) }} - - {{ formatValue(subItem) }} - - - - - - - {{ subKey }}: - - {{ getValueType(subValue) }} - - {{ formatValue(subValue) }} - - - - - - - - + + - - - - - - - - {{ getValueType(row._value) }} - - {{ typeof row._value === 'object' ? JSON.stringify(row._value) : formatValue(row._value) }} - - - - - - {{ t('jsonparser.btn.copy') }} - - + + + - + + { /> - + - - + + + + {{ t('jsonparser.panel.path') }} + + {{ selectedPath }} + {{ t('jsonparser.btn.copy') }} + + + + {{ t('jsonparser.panel.value') }} + + {{ formatValue(selectedValue) }} + {{ t('jsonparser.btn.copy') }} + + + + + + + diff --git a/frontend/src/components/JsonTreeNode.vue b/frontend/src/components/JsonTreeNode.vue new file mode 100644 index 0000000..3c8e6e6 --- /dev/null +++ b/frontend/src/components/JsonTreeNode.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + {{ getValueType(value) }} + + + + {{ formatValue(value) }} + + + Array[{{ value.length }}] + + + Object{ {{ Object.keys(value).length }} } + + + + + + + + + + + + + + + +