'Scan a json style data structure, and emit all fields and their values.
Example paths
Data
{ "data" : [ 1, 2, 3 ] }
Path:
/data == [1,2,3]
/data/[0] == 1'

def _scan_json_block(self, meta, prefix=''):

    if isinstance(meta, dict):
        for a in meta:
            for (path, value) in self._scan_json_block(meta[a], ((prefix + '/') + a)):
                (yield (path, value))
    elif isinstance(meta, list):
        for (i, a) in enumerate(meta):
            for (path, value) in self._scan_json_block(a, (prefix + ('[%d]' % i))):
                (yield (path, value))
    else:
        (yield (prefix, ('%s' % meta).encode('utf8', errors='replace')))
