fixed trend to json conversion