#!/usr/pkg/bin/python3.7

"""
Usage:
    extratools-flatten [--force]
"""

import sys
import json

from docopt import docopt
from extratools.jsontools import flatten

argv = docopt(__doc__)
force = argv["--force"]

data = json.load(sys.stdin)
json.dump(flatten(data, force=force), sys.stdout)
