Export performance optimization (#475)

* recreate metadata path if needed, before exporting data
This commit is contained in:
bnkai
2020-04-24 05:52:21 +03:00
committed by GitHub
parent ba09bfa64a
commit 9b1518beae
147 changed files with 11923 additions and 9958 deletions

View File

@@ -2,7 +2,8 @@ package jsonschema
import (
"bytes"
"encoding/json"
"github.com/json-iterator/go"
"io/ioutil"
"time"
)
@@ -25,6 +26,7 @@ func marshalToFile(filePath string, j interface{}) error {
func encode(j interface{}) ([]byte, error) {
buffer := &bytes.Buffer{}
var json = jsoniter.ConfigCompatibleWithStandardLibrary
encoder := json.NewEncoder(buffer)
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")