简体   繁体   English

无法将字符串转换为Json字符串?

[英]Unable to convert string to Json string?

I have collected data from some third party. 我已经从一些第三方收集了数据。 From their i am getting string look like json string 从他们我得到的字符串看起来像json字符串

'[{LastName=jkl, FirstName=ghi, EmailAddress=ghi@jkl.com, IncludeInEmails=true}]'

but doesn't have double quotes around key and value. 但在键和值周围没有双引号。

one solution is. 一种解决方案是。 I can read string and put it into map and convert map into json string. 我可以读取字符串并将其放入map并将map转换为json字符串。

is there any other solution for this? 还有其他解决方案吗?

最好删除所有[{字符,用分割字符串,然后用=分割结果字符串列表,以获得键值对列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM