GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - linearmouse/JSONPatcher: [WIP] Patch JSON / JSONC

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
Sources/JSONPatcher
Sources/JSONPatcher
 
 
Tests/JSONPatcherTests
Tests/JSONPatcherTests
 
 
.gitignore
.gitignore
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 

Repository files navigation

[WIP] JSONPatcher

Patch JSON / JSONC.

Background

When JSON / JSONC is parsed and re-encoded, some "trivial" information will be lost, such as whitespaces and comments.

Normally, this is not a problem for JSON, but for JSONC (or JSON5), it is a bad experience for users to find that comments are removed.

There are two approaches for preserving these "trivial" things when JSONC is modified programmatically:

  1. Build a parser that deserializes the "trivial" things into structures, and then serializes them back into JSONC.
  2. Generate the final JSONC content from the original JSONC content and the modified JSON content.

The first approach requires the developers to modify their structures by adding fields to store these "trivial" data. Therefore, this module implements the second approach.

Goals

The goal of this module is not to "efficiently" parse JSONC, but to make it easier for developers to switch from JSON to JSONC.

Current status

  • Scanner
  • Parser
  • Patcher
  • Formatter

About

[WIP] Patch JSON / JSONC

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.