<commit_before>
module Json.Encode where

{-| Library for turning Elm values into JSON values.

# To String
@docs toString

# Primatives
@docs string, int, float, bool, null

# Arrays
@docs list, array

# Objects
@docs object
-}

import Array (Array)
import Native.Json


type Value = Value


{-| Convert a `Value` into a prettified string. The first argument specifies
the amount of indentation in the resulting string.

    person =
        object
          [ ("name", string "Tom")
          , ("age", int 42)
          ]

    compact = encode 0 person
    -- {"name":"Tom","age":42}
<commit_msg>Replaced @docs toString with @docs encode.<commit_after>
module Json.Encode where

{-| Library for turning Elm values into JSON values.

# Encoding
@docs encode

# Primatives
@docs string, int, float, bool, null

# Arrays
@docs list, array

# Objects
@docs object
-}

import Array (Array)
import Native.Json


type Value = Value


{-| Convert a `Value` into a prettified string. The first argument specifies
the amount of indentation in the resulting string.

    person =
        object
          [ ("name", string "Tom")
          , ("age", int 42)
          ]

    compact = encode 0 person
    -- {"name":"Tom","age":42}

{'fraction_non_alphanumeric': 0.10702614379084967, 'fraction_numerical': 0.008169934640522876, 'mean_word_length': 2.852201257861635, 'pattern_counts': {'":': 4, '<': 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': '4077396', 'n_tokens_mistral': 378, 'n_tokens_neox': 358, 'n_words': 144}