<commit_before>[![Build Status](https://travis-ci.org/MaartenGDev/html-parser.svg?branch=master)](https://travis-ci.org/MaartenGDev/html-parser)
[![Coverage Status](https://coveralls.io/repos/github/MaartenGDev/html-parser/badge.svg?branch=master)](https://coveralls.io/github/MaartenGDev/html-parser?branch=master)

# Html Parser
A tool to convert `html` to `JSON` and `JSON` to `html`.

## Demo
[Try it online](https://parser.maartendev.me/)

## Convert JSON to html

```js
import jsonParser from './jsonParser';

const json = `
[
  {
    "type": "div",
    "value": "",
    "children": [
      {
        "type": "h1",
        "value": "test",
        "attributes": {
          "data-translation-id": "46"<commit_msg>Migrate demo site to GitHub pages<commit_after>[![Build Status](https://travis-ci.org/MaartenGDev/html-parser.svg?branch=master)](https://travis-ci.org/MaartenGDev/html-parser)
[![Coverage Status](https://coveralls.io/repos/github/MaartenGDev/html-parser/badge.svg?branch=master)](https://coveralls.io/github/MaartenGDev/html-parser?branch=master)

# Html Parser
A tool to convert `html` to `JSON` and `JSON` to `html`.

## Demo
- [Try json-to-html feature online](https://maartengdev.github.io/html-parser/)
- [Try translation feature online](https://maartengdev.github.io/html-parser/translation.html)

## Convert JSON to html

```js
import jsonParser from './jsonParser';

const json = `
[
  {
    "type": "div",
    "value": "",
    "children": [
      {
        "type": "h1",
        "value": "test",
        "attributes": {
          "data-translation-id": "46"
{'fraction_non_alphanumeric': 0.18726355611601514, 'fraction_numerical': 0.0037831021437578815, 'mean_word_length': 3.737313432835821, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '32566', 'n_tokens_mistral': 560, 'n_tokens_neox': 548, 'n_words': 95}