🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@smithy/middleware-serde

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-serde

[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-serde/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-serde) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-serde.svg)](https://www.npmjs.com/package/@smithy

4.0.6
latest
Source
npm
Version published
Weekly downloads
27M
5.94%
Maintainers
3
Weekly downloads
 
Created

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

FAQs

Package last updated on 19 May 2025

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