![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
json-schema-dynamo
Advanced tools
Transform objects based on their JSON Schema definition back and forth between DynamoDB items
json-schema-dynamo
If you are able to, please consider using the DocumentClient
in the AWS.DynamoDB
SDK as it makes this package mostly unnecessary.
An easier way to transform objects into DynamoDB items
var transformers = require('json-schema-dynamo')
var schema = {
type: 'object',
properties: {
id: {
type: 'string'
},
createDate: {
type: 'date'
},
name: {
type: 'string'
},
active: {
type: 'boolean'
},
likes: {
type: 'number'
},
types: {
type: 'array',
items: {
type: 'string'
}
},
userIds: {
type: 'array',
items: {
type: 'number'
}
}
}
}
var model = {
id: 'asdf',
createDate: new Date(),
name: 'asdffdas',
likes: 1,
active: true,
types: ['qwerty', 'ytrewq'],
userIds: [1, 2, 3, 4, 5, 6, 7]
}
var item = transformers.fromModelToDynamoItem(schema, model)
console.log(item)
/*
{
id: {
S: 'asdf'
},
createDate: {
N: '1928383'
},
name: {
S: 'asdffdas'
},
likes: {
N: '1'
},
active: {
B: 'true'
},
types: {
SS: ['qwerty', 'ytrewq']
},
userIds: {
SN: ['1', '2', '3', '4', '5', '6', '7']
}
}
*/
var newModel = transformers.fromDynamoItemToModel(schema, item)
console.log(newModel)
/*
{
id: 'asdf',
createDate: <Date>,
name: 'asdffdas',
active: true,
likes: 1
types: ['qwerty', 'ytrewq'],
userIds: [1, 2, 3, 4, 5, 6, 7]
}
*/
Currently it supports: string, number, integer, boolean, array of strings, array of numbers, and lists
There is also custom support for dates. You can define an attribute as a date type which will be transformed into an N
in Dynamo and then back into a date when retrieved.
Both transforms will also validate your model against your schema as well
FAQs
Transform objects based on their JSON Schema definition back and forth between DynamoDB items
We found that json-schema-dynamo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.