# amf2json

> Small library for converting AMF0 and AMF3 to JSON

Latest version **1.0.7** (published 2020-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install amf2json
pnpm add amf2json
yarn add amf2json
bun add amf2json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-05-06 |
| First published | 2020-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | SwampApe |
| Maintainers | swampape |

## Links

- npm: https://www.npmjs.com/package/amf2json
- Repository: https://github.com/SwampApe/node-amf
- Homepage: https://github.com/SwampApe/node-amf#readme
- Issues: https://github.com/SwampApe/node-amf/issues
- npm.io page: https://npm.io/package/amf2json

## Recent versions

- 1.0.7 (latest) — 2020-05-06
- 1.0.6 — 2020-05-06
- 1.0.5 — 2020-05-06
- 1.0.4 — 2020-05-05
- 1.0.3 — 2020-05-04
- 1.0.2 — 2020-05-03
- 1.0.1 — 2020-05-02

## README

# node-amf
## Installation
```
npm install amf2json
```
## Usage
node-amf will attempt to decode everything in the buffer and will return an array containing every the decoded type.
By default node-amf returns an instance of the class but if you want to have a different instance to have separate
reference tables then you can call (instance).getNewAMF();
```
const AMF = require('amf2json');

//String: '_result'
const rawAMF0 = Buffer.from([0x02, 0x00, 0x07, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74]);
const result = AMF.decode(rawAMF0);
```
result should have a value of
```
['_result']
```
## TODO
- [x] AMF0 Decoding
- [x] AMF3 Decoding
- [x] AMF0 Encoding 
- [ ] Finish AMF0 tests
- [ ] AMF3 Encoding
- [ ] Finish AMF3 tests

---
_Source: https://npm.io/package/amf2json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
