Socket
Socket
Sign inDemoInstall

@smithy/middleware-serde

Package Overview
Dependencies
1
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-serde


Version published
Maintainers
2
Created

Package description

What is @smithy/middleware-serde?

@smithy/middleware-serde is a middleware package for the Smithy framework that provides serialization and deserialization capabilities. It is used to convert data between different formats, such as JSON and XML, and to handle the transformation of request and response data in a consistent manner.

What are @smithy/middleware-serde's main functionalities?

Serialization Middleware

This feature allows you to add serialization middleware to a Smithy client. The middleware handles the conversion of request data into the appropriate format before sending it to the server.

const { getSerdePlugin } = require('@smithy/middleware-serde');
const { Client } = require('@smithy/client');

const client = new Client({
  region: 'us-west-2',
  plugins: [getSerdePlugin()]
});

// Example request
const request = {
  operation: 'SomeOperation',
  input: { key: 'value' }
};

client.send(request).then(response => {
  console.log(response);
}).catch(error => {
  console.error(error);
});

Deserialization Middleware

This feature allows you to add deserialization middleware to a Smithy client. The middleware handles the conversion of response data from the server into the appropriate format for the client.

const { getSerdePlugin } = require('@smithy/middleware-serde');
const { Client } = require('@smithy/client');

const client = new Client({
  region: 'us-west-2',
  plugins: [getSerdePlugin()]
});

// Example request
const request = {
  operation: 'SomeOperation',
  input: { key: 'value' }
};

client.send(request).then(response => {
  console.log(response);
}).catch(error => {
  console.error(error);
});

Other packages similar to @smithy/middleware-serde

Readme

Source

@smithy/middleware-serde

NPM version NPM downloads

FAQs

Last updated on 19 Jun 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc