nvflare.fuel.utils.json_scanner module

class JsonObjectProcessor[source]

Bases: object

JsonObjectProcessor is used to process JSON elements by the scan_json() function.

process_element(node: Node)[source]

This method is called by the scan() function for each JSON element scanned.

Parameters

node – the node representing the JSON element

class JsonScanner(json_data: dict, location=None)[source]

Bases: object

Scanner for processing JSON data.

Parameters
  • json_data – dictionary containing json data to scan

  • location – location to provide in error messages

scan(processor: JsonObjectProcessor)[source]
class Node(element)[source]

Bases: object

A JSON element with additional data.

Parameters

element – element to create Node object for

parent_element()[source]
path()[source]