TJSONToPascal class
Main class for generating Pascal code from JSON data
Declaration
TJSONToPascal = class(TComponent)Inheritance
- TJSONToPascal
- TComponent
- TPersistent
- TObject
Description
TJSONToPascal is the core component that generates Object Pascal class definitions from JSON data structures.
It analyzes the JSON input and creates complete Pascal unit code with classes that can serialize to and from JSON format.
The class provides comprehensive control over the code generation process through various properties and options. Generated classes include appropriate property declarations, constructor/destructor methods, and optional JSON serialization methods.
Properties
JSONData | public | JSON data object to generate code from |
JSONStream | public | Stream containing JSON data to generate code from |
Active | published | Automatically execute code generation when set to True |
Options | published | Code generation options |
JSON | published | JSON string to generate code from |
Code | published | Generated Pascal unit code |
PropertyMap | published | Manual type mappings for JSON properties |
DestUnitName | published | Name of the generated Pascal unit |
DefaultParentName | published | Default base class for generated objects |
IndentSize | published | Number of spaces for code indentation |
ExtraUnitNames | published | Additional units for the uses clause |
PropertyTypeSuffix | published | Suffix for generated object and array type names |
FieldPrefix | published | Prefix for private field names |
ObjectConstructorArguments | published | Arguments for object constructors |
ToplevelObjectClassName | published | Name of the main generated class |
Methods
Inherited
From TComponent (74)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
