Commit 81e3f936 by Kyle Brandt Committed by GitHub

Backend Readme: Add section on avoiding simplejson (#25116)

parent fcb9dcb0
......@@ -71,6 +71,10 @@ Refactor HTTP handlers so that the handler methods are on the HttpServer instanc
Store newly introduced date columns in the database as epochs if they require date comparison. This permits a unified approach for comparing dates against all the supported databases instead of handling dates differently for each database. Also, by comparing epochs, we no longer need error pruning transformations to and from other time zones.
### Avoid use of the simplejson package
Use of the `simplejson` package (`pkg/components/simplejson`) in place of types (Go structs) results in code that is difficult to maintain. Instead, create types for objects and use the Go standard library's [`encoding/json`](https://golang.org/pkg/encoding/json/) package.
### Provisionable*
All new features that require state should be possible to configure using config files. For example:
......
// Package simplejson provides a wrapper for arbitrary JSON objects that adds methods to access properties.
// Use of this package in place of types and the standard library's encoding/json package is strongly discouraged.
package simplejson
import (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment