
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
@syslogic/graph-serializer
Advanced tools
Typescript serializer for converting betweet JSON data and Object graphs
Graph serializer is a lightweight ibrary for converting JSON data structures to typed objects usable in typescript. Benefits include better type checking in your IDE, better type safety, and standardized date conversion. Primary use case is for easy integration of RESTful services and typescript.
Add graph-serializer to your dependencies:
npm i --save @syslogic/graph-serializer
Graph-serializer provides an annotation which you can use in your typescrpt entities. You can use the @serializable
to specify which properties need to be (de)serialized.
The serialize
and deserialize
functions can then be used with the entity
import {serializable,deserialize,serialize} from "@syslogic/graph-serializer"
class Foo {
@serializable()
public thisWillBeSerialized: string = 'test';
}
let fooObj = deserialize(Foo, {thisWillBeSerialized: 'bar'}); // fooOjb instanceof Foo === true
let fooGraph = serialize(new Foo()); // fooGraph = {thisWillBeSerialized: 'bar'}
There are a few serializer parameters to seraialize all sorts of serializers. Check the test directory for more examples. Features include:
Date
deserializationFAQs
Typescript serializer for converting betweet JSON data and Object graphs
We found that @syslogic/graph-serializer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.