Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/middleware-serde

Package Overview
Dependencies
Maintainers
5
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-serde

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

  • 1.0.0-gamma.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7M
decreased by-9.22%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/middleware-serde?

@aws-sdk/middleware-serde is a middleware package for the AWS SDK for JavaScript. It provides serialization and deserialization capabilities for AWS service requests and responses. This middleware is essential for converting data to and from the wire format used by AWS services.

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

Serialization Middleware

This feature allows you to add serialization logic to the client stack, converting input data into the format required by AWS services.

const { SerdePlugin } = require('@aws-sdk/middleware-serde');
const { HttpRequest } = require('@aws-sdk/protocol-http');

const serializeMiddleware = (next, context) => async (args) => {
  const request = new HttpRequest(args.input);
  // Add serialization logic here
  return next({ ...args, request });
};

const clientStack = [];
clientStack.push(serializeMiddleware);

console.log('Serialization middleware added to client stack.');

Deserialization Middleware

This feature allows you to add deserialization logic to the client stack, converting response data from AWS services into a usable format.

const { SerdePlugin } = require('@aws-sdk/middleware-serde');
const { HttpResponse } = require('@aws-sdk/protocol-http');

const deserializeMiddleware = (next, context) => async (args) => {
  const response = new HttpResponse(args.output);
  // Add deserialization logic here
  return next({ ...args, response });
};

const clientStack = [];
clientStack.push(deserializeMiddleware);

console.log('Deserialization middleware added to client stack.');

Other packages similar to @aws-sdk/middleware-serde

FAQs

Package last updated on 08 Jul 2020

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc