Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
html-to-json-parser
Advanced tools
Readme
This library is capable to convert HTML string/element to JSON/JS Object.
<div class="container">
<ul>
<li>Hello <strong>World</strong></li>
</ul>
</div>
{
"type": "div",
"attributes": {
"class": "container"
},
"content": [
{
"type": "ul",
"content": [
{
"type": "li",
"content": [
"Hello ",
{
"type": "strong",
"content": [
"World"
]
}
]
}
]
}
]
}
Install html-to-json-parser with npm/yarn
npm install html-to-json-parser // npm
yarn add html-to-json-parser // yarn
import HTMLParser from 'html-to-json-parser'; // ES6
const HTMLParser = require('html-to-json-parser'); // CommonJS
const element = '<div><ul><li>Hello <strong>World</strong></li></ul></div>'; // HTML string
const element = document.querySelector('div'); // HTML element
let result = await HTMLParser(element, true); // Default: false - true: return JSON, false: return JS Object
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
html-to-json-parser © Yousuf
Authored and maintained by Yousuf Kalim.
GitHub @yousufkalim · LinkedIn @yousufkalim
FAQs
This library converts HTML to JSON or JSON to HTML tree
We found that html-to-json-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.