type-mismatch-encoding

module
v0.0.0-...-1861af9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0

README

Type mismatched encoding (Golang)

This repository is a fork of Go's 1.23.3 encoding/xml and encoding/json packages that adds the functionality to allow members of a struct with a type that does not match the type of the JSON/XML member it is mapped to, to be deserialized to their zero-values with no returned errors.

This "fork" is not a conventional Github fork, it's only copies of those packages.

Purpose

The purpose of this library, mainly, is to solve another issue of another repository (https://github.com/otaxhu/problem), I thought it could be more useful if it is decoupled of that repository.

Audit

In order to be the most transparent, you can check the differences between this fork and Go's 1.23.3 packages by downloading a copy of Go 1.23.3 and cloning this repository, then executing the diff command:

# diff on encoding/json
diff -ur path/to/go/src/encoding/json path/to/type-mismatch-encoding/encoding/json

# diff on encoding/xml
diff -ur path/to/go/src/encoding/xml path/to/type-mismatch-encoding/encoding/xml

Directories

Path Synopsis
encoding

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL