added JSON parsing in logger