<commit_before>package io.fintrospect.formats.json

import java.math.BigInteger

/**
 * Capability to create and parse JSON message formats in a generic way.
 */
trait JsonFormat[ROOT_NODETYPE, NODETYPE] {

  type Field = (String, NODETYPE)

  /**
   * Attempt to parse the JSON into the root node type. Implementations should throw an exception
   * if the parsing fails, which is dealt with by the surrounding deserialisation mechanism.
   */
  def parse(in: String): ROOT_NODETYPE

  def pretty(in: ROOT_NODETYPE): String

  def compact(in: ROOT_NODETYPE): String<commit_msg>dave - comments<commit_after>package io.fintrospect.formats.json

import java.math.BigInteger

/**
 * Capability to create and parse JSON message formats in a generic way. Used to serialise and deserialise
  * request parameters and bodies.
 */
trait JsonFormat[ROOT_NODETYPE, NODETYPE] {

  type Field = (String, NODETYPE)

  /**
   * Attempt to parse the JSON into the root node type. Implementations should throw an exception
   * if the parsing fails, which is dealt with by the surrounding deserialisation mechanism, so you
    * don't need to worry about having to muddy your own code with the exception handling.
   */
  def parse(in: String): ROOT_NODETYPE

  def pretty(in: ROOT_NODETYPE): String

  def compact(in: ROOT_NODETYPE): String
{'fraction_non_alphanumeric': 0.07245283018867925, 'fraction_numerical': 0.0, 'mean_word_length': 4.11969111969112, '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': '1887761', 'n_tokens_mistral': 386, 'n_tokens_neox': 391, 'n_words': 152}