cosmos-db-migration-utility/src/configure/json_encoder.py [7:16]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
class JSONFriendlyEncoder(json.JSONEncoder):
    def default(self, o):
        if isinstance(o, Decimal):
            if o % 1 > 0:
                return float(o)
            else:
                return int(o)
        if isinstance(o, datetime):
            return o.isoformat()
        return super(JSONFriendlyEncoder, self).default(o)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cosmos-db-migration-utility/src/lambda/gap-watch-request-reader/lambda_function.py [23:32]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
class JSONFriendlyEncoder(json.JSONEncoder):
    def default(self, o):
        if isinstance(o, Decimal):
            if o % 1 > 0:
                return float(o)
            else:
                return int(o)
        if isinstance(o, datetime):
            return o.isoformat()
        return super(JSONFriendlyEncoder, self).default(o)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



