Skip to content
Snippets Groups Projects
  • Naveen Albert's avatar
    8a45cd7a
    func_json: Enhance parsing capabilities of JSON_DECODE · 8a45cd7a
    Naveen Albert authored
    Adds support for arrays to JSON_DECODE by allowing the
    user to print out entire arrays or index a particular
    key or print the number of keys in a JSON array.
    
    Additionally, adds support for recursively iterating a
    JSON tree in a single function call, making it easier
    to parse JSON results with multiple levels. A maximum
    depth is imposed to prevent potentially blowing
    the stack.
    
    Also fixes a bug with the unit tests causing an empty
    string to be printed instead of the actual test result.
    
    ASTERISK-29913 #close
    
    Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b
    8a45cd7a
    History
    func_json: Enhance parsing capabilities of JSON_DECODE
    Naveen Albert authored
    Adds support for arrays to JSON_DECODE by allowing the
    user to print out entire arrays or index a particular
    key or print the number of keys in a JSON array.
    
    Additionally, adds support for recursively iterating a
    JSON tree in a single function call, making it easier
    to parse JSON results with multiple levels. A maximum
    depth is imposed to prevent potentially blowing
    the stack.
    
    Also fixes a bug with the unit tests causing an empty
    string to be printed instead of the actual test result.
    
    ASTERISK-29913 #close
    
    Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b