mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
8d50f5104d
Package `unsafe` is used in jlexer to prevent copying when casting from []byte to string, speeding up the marshalling process to a large extent. However, `unsafe` is not allowed in environments such as Google Appengine. Therefore two build tags are introduced, which either of them can disable the use of unsafe package, falling back to conventional copy-based []byte to string conversion. The build tags are `easyjson_nounsafe` and `appengine` (which is set when building for Google Appengine)