Package Torello.Browser.JsonAST

The contents of this package were largely written several years ago, when the Browser API was first developed. They remained in a Package-Private, "Public-API Invisible" state until August of 2025. Being part of a public facing API forces massive clean-ups, organization sweeps, renaming and code "anit-uglifying". Have you ever seen those Java-Script Generators called "uglify"? Horrible, if you ask me...

The primary impetus for putting this into the Public & Documented Part of the Java-HTML Library is just to continue to abide by the spirit of "Open Source" Code. Quite a bit of the Java-Doc Tool remains a Private-Internal Mystery, and this is largely due to the fact that the code is simply just not finished.

The Browser Chrome Dev-Tools Protocol Port to Java is coming to an end soon. Allowing Java-HTML users to see what it does seems important. The reality is that all this gigantic thing does is parse two '.json' Files which are regularly generated by Google Corporation (and unceremoniously dumped onto a public Git-Hub repository).

Once the Google-Generated Files 'browser_protocol.json' and 'js_protocol.json' have been parsed into an Abstract Syntax Tree (AST), that Syntax Tree is traveresed by another, internally maintained, Browser-Package to generate all of the '.java' Files which are provided in the packages Torello.Browser.BrowserAPI Torello.Browser.JavaScriptAPI




If you wish to "play around" and experiment with actual nodes of the classes in the JsonAST Package, then simply invoke this classes SERIALIZED_AST.deserializeFromJAR() method, and you will have a genuine AST with which you may experiment.


Object-Class Inheritance Tree:
This image portrays the Java Class Inheritance of these objects / classes.

JsonAST class inheritance: Entity→TCE→TypeNode/CommandNode/EventNode; PPR sibling; API & Domain independent


Runtime Instance Container Tree:
This image portrays these objects / classes as containers that hold instances / references of each other.

Runtime object instance tree: API→Domain→TypeNode/CommandNode/EventNode with PPR kind nodes