Fixed jansson port and added outputType flag.