# json-in-place

> edit json in-place

Latest version **1.0.1** (published 2016-08-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install json-in-place
pnpm add json-in-place
yarn add json-in-place
bun add json-in-place
```

## 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.1 |
| Published | 2016-08-02 |
| First published | 2016-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Finn Pauls |
| Maintainers | finnpauls |
| Keywords | json, format, preserve |

## Links

- npm: https://www.npmjs.com/package/json-in-place
- Repository: https://github.com/finnp/json-in-place
- Homepage: https://github.com/finnp/json-in-place#readme
- Issues: https://github.com/finnp/json-in-place/issues
- npm.io page: https://npm.io/package/json-in-place

## Dependencies (1)

- [json-lexer](https://npm.io/package/json-lexer.md) 1.1.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-08-02
- 1.0.0 — 2016-08-01

## README

# json-in-place
[![Build Status](https://travis-ci.org/finnp/json-in-place.svg?branch=master)](https://travis-ci.org/finnp/json-in-place)
[![Coverage Status](https://coveralls.io/repos/finnp/json-in-place/badge.svg?branch=master&service=github)](https://coveralls.io/github/finnp/json-in-place?branch=master)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

[![NPM](https://nodei.co/npm/json-in-place.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/json-in-place/)

Change keys on a JSON string, so the change will be a minimal diff. It will not
change the indentation of the string.

```js
var inplace = require('json-in-place')
var replaced = inplace('{"a":\t{"b": "c"},\n "arr": [1,2,3],\n "d": 1 }')
  .set('a.b', {'new': 'object'})
  .set('d', 2)
  .set('arr.1', 'hi')
  .toString()
// replaced will be ''{"a":\t{"b": {"new":"object"}}, "arr": [1,"hi",3], "d": 2 }''
```

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