maxmind/libmaxminddb

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

thombr03 opened this issue · 2 comments

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

I can reproduce this with jq-1.6.

@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