parse json to dictionary more correctly