Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Who rated this post

JSON parser extractor name with a "-"

L2 Linker

I have a JSON list (URL https://ip-ranges.cloud.signiant.com/MediaShuttle) with one part of the JSON path name containing a minus sign ("-"):

 

{
    "us-east-1": {
        "all_ips": [
            "3.83.158.71", 
            "3.87.14.184", 
            "34.207.126.66", 
            "34.227.155.76", 
            "34.236.155.245", 
            "52.2.203.56", 
            "52.23.203.179", 
            "52.73.28.78", 
            "52.86.231.134"
        ]
    }
}

 

Using the  JMESPath tester from jmespath.org, I created an expression that pulls out what I need:

  

  us-east-1.all_ips

 

However, the Minemeld engine will not start, throwing an 'Unknown Character" error, apparently due to the dash.  I've tried escaping and quoting using several variations and I cannot create the extractor needed.  These are the variations I've tried:

 

  • us-east-1.all_ips: Unknown Character (the '-')
  • "us-east-1.all_ips": Unknown Character
  • "us-east-1".all_ips: Engine won't start
  • "us-east-1".all_ips[]: Engine won't start
  • 'us-east-1'.all_ips: engine won't start
  • 'us-east-1'.all_ips[].{indicator:@}: engine won't start
  • "us-east-1".all_ips[].{indicator:@}: engine won't start
  • us\-east\-1.all_ips[].{indicator:@}: Unknown character
  • "us-east-1.all_ips"[].{indicator:@}: engine won't start (expected end but found [)
  • "us-east-1.all_ips[]".{indicator:@}: expected <block end>, but found '<scalar>'
  • "us-east-1.all_ips[].{indicator:@}": Unknown character
  • "us\-east\-1.all_ips[].{indicator:@}": engine won't start

 

Thanks in advance,

 

Mike

Who rated this post