pack result to json