maxmind / libmaxminddb

C library for the MaxMind DB file format
https://maxmind.github.io/libmaxminddb/
Apache License 2.0
912 stars 239 forks source link

Not able to parse json output with 'jq' command. #299

Closed thombr03 closed 2 years ago

thombr03 commented 2 years ago

jq - Command-line JSON processor

$ mmdblookup --file /usr/share/GeoIP/GeoIP2-Country.mmdb --ip 8.8.8.8 | jq parse error: Invalid numeric literal at line 7, column 0

oalders commented 2 years ago

I can reproduce this with jq-1.6.

oalders commented 2 years ago

@thombr03 I'd encourage you to use mmdbinspect instead:

mmdbinspect -db usr/share/GeoIP/GeoIP2-Country.mmdb 8.8.8.8 | jq

See https://github.com/maxmind/mmdbinspect#installation