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

@asyncapi/parser

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/parser - npm Package Compare versions

Comparing version 1.13.0 to 1.13.1

CODEOWNERS

1

lib/models/base.js

@@ -16,2 +16,3 @@ const ParserError = require('../errors/parser-error');

/**
* @param {string} [key] A key to retrieve from the JSON object.
* @returns {any}

@@ -18,0 +19,0 @@ */

2

package.json
{
"name": "@asyncapi/parser",
"version": "1.13.0",
"version": "1.13.1",
"description": "JavaScript AsyncAPI parser.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -32,2 +32,3 @@ <h5 align="center">

- [Circular references](#circular-references)
- [Stringify](#stringify)
- [Develop](#develop)

@@ -226,5 +227,11 @@ - [Contributing](#contributing)

For that, the Parser supports the ability to stringify a parsed AsyncAPI document through the static `AsyncAPIDocument.stringify(...parsedDoc)` method. This method differs from the native `JSON.stringify(...json)` implementation, in that every reference that occurs (at least twice throughout the document) is converted into a [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) path.
For that, the Parser supports the ability to stringify a parsed AsyncAPI document through the static `AsyncAPIDocument.stringify(...parsedDoc)` method. This method differs from the native `JSON.stringify(...json)` implementation, in that every reference that occurs (at least twice throughout the document) is converted into a [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) path with a `$ref:` prefix:
```json
{
"foo": "$ref:$.some.path.to.the.bar"
}
```
To parse a stringified document into an AsyncAPIDocument instance, you must use the static `AsyncAPIDocument.parse(...stringifiedDoc)` method. It isn't compatible with the native `JSON.parse()` method.
To parse a stringified document into an AsyncAPIDocument instance, you must use the static `AsyncAPIDocument.parse(...stringifiedDoc)` method. It isn't compatible with the native `JSON.parse()` method. It replaces the given references pointed by the [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) path, with an `$ref:` prefix to the original objects.

@@ -231,0 +238,0 @@ A few advantages of this solution:

@@ -291,3 +291,6 @@ /**

class Base {
json(): any;
/**
* @param [key] - A key to retrieve from the JSON object.
*/
json(key?: string): any;
}

@@ -294,0 +297,0 @@ interface ChannelParameter extends MixinDescription, MixinSpecificationExtensions {

Sorry, the diff of this file is too big to display

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