Online YAML to JSON| Quick format conversion- GoTool Online Toolkit

开发工具指南

This tool provides a YAML to JSON tool, which can quickly convert YAML formatted data to JSON format. The tool supports efficient format conversion, ensures consistency and accuracy of data between different formats, and facilitates data exchange and integration.

使用说明

Function introduction

  1. Online yaml transfer to json
  2. Explanation: Since the child nodes of the yaml tree are stored in map during the conversion process, the order of the results obtained after conversion to json is out of order.

Example

apiVersion: v1
kind: Service
metadata:
  name: test-k8s
spec:
  selector:
    app: test-k8s
  type: ClusterIP
  ports:
    - port: 8080        
      targetPort: 8080 

after treatment

{
	"apiVersion": "v1",
	"kind": "Service",
	"metadata": {
		"name": "test-k8s"
	},
	"spec": {
		"ports": [
			{
				"port": 8080,
				"targetPort": 8080
			}
		],
		"selector": {
			"app": "test-k8s"
		},
		"type": "ClusterIP"
	}
}