
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@gelight/json2sml
Advanced tools
Node package to convert JSON to SML
This library depends on SML (Simple Markup Language)
// Import the converter class from the module
import { Converter } from "@gelight/json2sml";
// JSON example
let json = {
"firstName": "John",
"lastName": "Smith",
"age": 27,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
}
}
// Use the converter to generate your SML document based on your JSON object
let doc = Converter.convert(json);
// Output > Logs all SML attributes from the SML element "address"
console.log(doc.getRoot().getElement("address").getAttributes());
Output:
[
SmlAttribute {
whitespaces: null,
comment: null,
name: 'streetAddress',
values: [ '21 2nd Street' ]
},
SmlAttribute {
whitespaces: null,
comment: null,
name: 'city',
values: [ 'New York' ]
},
SmlAttribute {
whitespaces: null,
comment: null,
name: 'state',
values: [ 'NY' ]
},
SmlAttribute {
whitespaces: null,
comment: null,
name: 'postalCode',
values: [ '10021-3100' ]
}
]
<html>
<head>
<title>JSON2SML - Node package to convert JSON to SML</title>
</head>
<body>
<script src="https://unpkg.com/@gelight/json2sml"></script>
<script>
let json = {
"firstName": "John",
"lastName": "Smith",
"age": 27,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
}
};
let doc = JSON2SML.Converter.convert(json);
console.log(doc.getRoot().getElement("address").getAttributes());
</script>
</body>
</html>
FAQs
Node package to convert JSON to SML
The npm package @gelight/json2sml receives a total of 1 weekly downloads. As such, @gelight/json2sml popularity was classified as not popular.
We found that @gelight/json2sml demonstrated a not healthy version release cadence and project activity because the last version was released 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
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.