<commit_before>========
Usage
========

Use `JSON262Encoder` as you would use `json.JSONEncoder` from the Python standard library::

    >>> import datetime
    >>> import json
	>>> from json262 import JSON262Encoder
    
    >>> json.dumps({'day': datetime.date(2010, 2, 17)}, cls=JSON262Encoder)
    '{"day": "2010-02-17"}'

You can encode a single Python data structure too::

    >>> JSON262Encoder().encode({'day': datetime.date(2010, 2, 17)})
    '{"day": "2010-02-17"}'
<commit_msg>Fix code block in usage docs.<commit_after>========
Usage
========

Use `JSON262Encoder` as you would use `json.JSONEncoder` from the Python standard library::

    >>> import datetime
    >>> import json
    >>> from json262 import JSON262Encoder

    >>> json.dumps({'day': datetime.date(2010, 2, 17)}, cls=JSON262Encoder)
    '{"day": "2010-02-17"}'

You can encode a single Python data structure too::

    >>> JSON262Encoder().encode({'day': datetime.date(2010, 2, 17)})
    '{"day": "2010-02-17"}'

{'fraction_non_alphanumeric': 0.19234642497482377, 'fraction_numerical': 0.09063444108761329, 'mean_word_length': 4.177083333333333, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 33, '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': '3656719', 'n_tokens_mistral': 374, 'n_tokens_neox': 303, 'n_words': 93}