我的WebAPi正在返回JSON字符串,如下所示 {“DataProvider”:{“AdministrationDatabase”:{“ConnectionString”:{“@ IsEncrypted”:“false”,“#text”:“Data Source = * bank.dev \ GROUPCHAT; Database = Administration; User Id = devsa;密码= P @ ssw0rd !;“}},”ApplicationAdministrationDatabase“:{”ConnectionString“:{”@ IsEncrypted“:”false“,”#text“:”Data Source = bank .dev \ CHAT; Database = ApplicationAdministration; User Id = devsa; Password = P @ ssw0rd !;“}},”Database“:{”ConnectionString“:{”@ IsEncrypted“:”false“,”#text“:”数据源= ** bank.dev \ GROUPCHAT;数据库= ZLExtract;用户ID = devsa;密码= P @ ssw0rd !;“}}}}
我如何转换它以便FuelUXTree可以接受它作为数据源。
这是手动转换的数据:
{ “的DataProvider”:{ “名称”: “的DataProvider”, “类型”: “文件夹”, “additionalParameters”:{ “孩子”:{ “AdministrationDatabase”:{ “名称”: “AdministrationDatabase”,“类型“:” 文件夹”, “additionalParameters”:{ “孩子”:{ “的ConnectionString”:{ “名”: “ConnectionString的”, “类型”: “文件夹”, “additionalParameters”:{ “孩子”:{ “文本” :{“name”:“Data Source = * bank.devGROUPCHAT; Database = Administration; User Id = devsa; Password = P @ ssw0rd!;”,“type”:“item”},“IsEncrypted”:{ “名”: “假”, “类型”: “项”}}}}}}}, “ApplicationAdministrationDatabase”:{ “名”: “ApplicationAdministrationDatabase”, “类型”: “文件夹”, “additionalParameters”:{” children“:{”ConnectionString“:{”name“:”ConnectionString“,”type“:”folder“,”additionalParameters“:{”children“:{”text“:{”name“:”Data Source = bank.devGROUPCHAT; Database = Administration; User Id = devsa; Password = P @ ssw0rd !;“,”type“:”item“},”IsEncrypted“:{”name“:”false“,”键入 “:” 项 “}}}}}}},” ZLExtractDatabase “:{” 名 “:” ZLExtractDatabase “ ”类型“: ”文件夹“, ”additionalParameters“:{ ”孩子“:{” 精读nectionString“:{”name“:”ConnectionString“,”type“:”folder“,”additionalParameters“:{”children“:{”text“:{”name“:”Data Source = ** bank .devGROUPCHAT; Database = Administration; User Id = devsa; Password = P @ ssw0rd !;“,”type“:”item“},”IsEncrypted“:{”name“:”false“,”type“:”item“ }}}}}}}}}}