I have an output of HTML like this:
and so on.
I would like to extract the id,name and value from this and convert them to JSON in java.
Edit: My JSPN output will look like
{"id": "status","name": "status", "value": "0"}
etc.
解决方案
just three steps
1.create a html Input element model which havs 3 properties: id,name,value.
2.extract values from the html file, you can use htmlparser and create a model instance using those values
3.convert model instance into json string.