JQ

Counting json length

jq -s '. | length' sample_data.json

Converting back after forth between json and jsonl

jq -s '.' input.jsonl > output.json

And the other way:

jq -c '.[]' input.json > output.jsonl