# Path: sacred/serializer.py
# def flatten(obj):
#     return _json.loads(json.encode(obj, keys=True))
# 
# def restore(flat):
#     return json.decode(_json.dumps(flat), keys=True)


import os
import pickle
import json
import sacred.optional as opt
from sacred.serializer import flatten, restore
#!/usr/bin/env python
# coding=utf-8




__all__ = ("load_config_file", "save_config_file")


class Handler:
    def __init__(self, load, dump, mode):
        self.load = load
        self.dump = dump
        self.mode = mode


HANDLER_BY_EXT = {
    ".json": Handler(

# Path: sacred/serializer.py
# def flatten(obj):
#     return _json.loads(json.encode(obj, keys=True))
# 
# def restore(flat):
#     return json.decode(_json.dumps(flat), keys=True)


# Path: sacred/config/config_files.py
import os
import pickle
import json
import sacred.optional as opt
from sacred.serializer import flatten, restore

#!/usr/bin/env python
# coding=utf-8




__all__ = ("load_config_file", "save_config_file")


class Handler:
    def __init__(self, load, dump, mode):
        self.load = load
        self.dump = dump
        self.mode = mode


HANDLER_BY_EXT = {
    ".json": Handler(

        lambda fp: restore(json.load(fp)),