简体   繁体   中英

json simple parser

Hello I have a problem with a json simple parser. I have to parse something like this

{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov0"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov1"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov2"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov3"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov4"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov5"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov6"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov7"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov8"}{"phoneNumber":"9874662222","name":"Иван","surname":"Иванов","key":"ivanov9"}

So I have many elements, what should I do?

Try to read about how to deal with Strings in the programming language you need to work with. Learn about JSON, what it is and how a JSON statement is supposed to look like. Obviously, read about parsers too. Try to code something and then show us the code you've made.

Whatever you posted is not a JSON. It is list of JSON. Your question is not so clear but try to parse valid json in loop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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