Add import "github.com/json-iterator/go" and replace json.Marshal with jsoniter.Marshal. Then the code should behave exactly the same, just much faster. Unlike easyjson or other json libaries, jsoniter does not rely on static code generation. Unmarshal, NewEncoder, NewDecoder they all works. Existing types implemented Marshaler or Unmarshaler interface will also work. Map with non-string key also work. Yes, everything just works. The default performance is already several times faster than the standard library. Use jsoniter.ConfigFastest, this will marshal the float with 6 digits precision (lossy), which is significantly faster.
Features
- One line style
- You can parse json in one line, without defining any struct
- 100% Compatibility
- By default, jsoniter do not sort the map keys like standard libary
- The default performance is already several times faster than the standard library
- Drop-in replacement
Categories
FrameworksLicense
MIT LicenseFollow json iterator
Other Useful Business Software
Accounting practice management software
Canopy is a cloud-based practice management software for accounting and tax firms, offering tools for client engagement, document management, workflow automation, and time & billing. Its Client Engagement platform centralizes interactions with a secure portal, customizable branding, and email integration, while the Document Management system enables organized, paperless file storage. The Workflow module enhances visibility into tasks and projects through templates, task assignments, and automation, reducing human error. Additionally, the Time & Billing feature tracks billable hours, generates invoices, and processes payments, ensuring accurate financial management. With its comprehensive features, Canopy streamlines operations, reduces stress, and enhances client experiences.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of json iterator!