i don't know why this strings contert to Json have error.
{
softName: lovePlay,
packageName: com.feng.play,
softId:13232,
downUrl: http.//mumayi.pay.love/down?id=13211
}
Have somebody can help me? thanks.
Strings should be under double quotes. Something like this:
{
"softName":"lovePlay",
"packageName":"com.feng.play",
"softId":13232,
"downUrl":"http.//mumayi.pay.love/down?id=13211"
}
There are many services on the internet where you be able to validate your json data. Click here
Your JSON
string is incorrect, you're missing the quote signs ("
).
Try this:
{
"softName": "lovePlay",
"packageName": "com.feng.play",
"softId": "13232",
"downUrl": "http.//mumayi.pay.love/down?id=13211"
}
Thanks all. I have solved this problem. When I use this:
<!-- white space added for readability -->
<input type="button" onclick="getp1('{softName:lovePlay
,packageName:com.feng.play
,softId:13232
,downUrl:\'http\:\/\/mumayi.pay.love\/down\?id=13211\'}')"
value="获取"/>
I can get strings convert to json. I use it by webview.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With