aboutsummaryrefslogtreecommitdiff
path: root/pyfunkwhale/utils.py
blob: 9ba5d0f200e06db361681ab287bd153375482063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json


def read_file(filename):
    with open(filename, 'r') as file:
        data = file.read()

    return data


def write_file(filename, data):
    with open(filename, 'w') as file:
        file.write(json.dumps(data))

    return data