<commit_before>package boardgame

import (
	"encoding/json"
)

//A JSONObject is an object that is ready to be serialized to JSON.
type JSONObject interface{}

//JSONMap is just convenient where you need to create a map
type JSONMap map[string]JSONObject

type JSONer interface {
	//Returns the canonical JSON representation of this object, suitable to
	//being communicated across the wire or saved in a DB.
	JSON() JSONObject
}

//Serialize converts the JSONObject into bytes, suitable for being transferred
//across the wire or written to disk.
func Serialize(o JSONObject) []byte {
	result, err := json.Marshal(o)
	if err != nil {
		return []byte("")
	}
	return result
}
<commit_msg>Serialize on JSONObject outputs indented output<commit_after>package boardgame

import (
	"encoding/json"
)

//A JSONObject is an object that is ready to be serialized to JSON.
type JSONObject interface{}

//JSONMap is just convenient where you need to create a map
type JSONMap map[string]JSONObject

type JSONer interface {
	//Returns the canonical JSON representation of this object, suitable to
	//being communicated across the wire or saved in a DB.
	JSON() JSONObject
}

//Serialize converts the JSONObject into bytes, suitable for being transferred
//across the wire or written to disk.
func Serialize(o JSONObject) []byte {
	result, err := json.MarshalIndent(o, "", "  ")
	if err != nil {
		return []byte("")
	}
	return result
}

{'fraction_non_alphanumeric': 0.08146067415730338, 'fraction_numerical': 0.0, 'mean_word_length': 4.200729927007299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1702232', 'n_tokens_mistral': 400, 'n_tokens_neox': 396, 'n_words': 185}