Java HTML转图片 java html转json

发布时间:2023-05-18 09:15:43

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.

本文是转载内容,我们尊重原作者对文章的权利。如有内容错误或侵权行为,请联系我们更正或删除文章。

ps 图灵课堂老师从近一百套最新一线互联网公司面试题中精选而出,涵盖Java架构面试 所有技术栈,包括JVM,Mysql,并发,Spring,Redis,MQ,Zookeeper,Netty, Dubbo,Spring Boot,Spring Cloud,数据结构与算法,设计模式等相关技术领域的大 厂面试题及详解。 详情咨询客服获取全套面经试题。

上一篇 Java中方法和接口的区别 java接口内的方法
下一篇 Java 蓝牙设备 连接 控制 java调用蓝牙程序

文章素材均来源于网络,如有侵权,请联系管理员删除。

标签: