Parse values and write to JSON