-1

Can anyone tell me please how to convert html code into json obj by using form.

For example:

If this is my HTML Code:

<div class="title">#Title 1</div>
<div class="content"><p>Some Content</p></div>

I want to convert this into Json obj like

[{"title":"#Title 1","content":"<p>some content<\/p>"}]
user1619228
  • 63
  • 4
  • 13

2 Answers2

0

Try using this tool;

http://json.fastfrag.org/

Wasim
  • 4,639
  • 8
  • 47
  • 86
0

Hmmm, i just googled for you, there are tons of websites who can help you. I found this one in particular very helpfull. It requires Jquery though, and I am not sure if you are familiar with it.

Convert HTML form to JSON and POST using jQuery

Dorvalla
  • 4,622
  • 4
  • 25
  • 42