parse line into JSON