TeeJee.Json

1. Overview

The TeeJee.Json module provides typed JSON access helpers for BastionGuard Backup. It reads string, Boolean, integer, and unsigned 64-bit JSON members with caller-supplied defaults and conversion protection.

The implementation is written in Vala and uses GLib/GIO together with the application utility namespaces required by the file.


2. Dependencies and Integration

The module imports:

  • Json
  • TeeJee.Logging

Key runtime integrations include:

  • JSON-GLib – structured configuration or metadata serialization

3. Declared Types

3.1 TeeJee.JsonHelper

namespace TeeJee.JsonHelper

This namespace groups stateless utility functions and shared constants.


4. State, Properties, Constants, and Signals

The file does not maintain mutable object state. Its primary content is constants or stateless helper behavior.


5. Public API and Operational Methods

5.1 json_get_string()

public string json_get_string(Json.Object jobj, string member, string def_value)

Implements the json get string operation for this module.

5.2 json_get_bool()

public bool json_get_bool(Json.Object jobj, string member, bool def_value)

Implements the json get bool operation for this module.

5.3 json_get_int()

public int json_get_int(Json.Object jobj, string member, int def_value)

Implements the json get int operation for this module.

5.4 json_get_uint64()

public uint64 json_get_uint64(Json.Object jobj, string member, uint64 def_value)

Implements the json get uint64 operation for this module.


6. Operational Flow

  1. Expose the module data or constant text to the caller.

7. Error Handling and Diagnostics

  • The TeeJee logging layer records errors, debug state, generated commands, and operational messages.

8. Runtime and Security Considerations

  • Error handling: callers should inspect nullable returns and Boolean status values because utility methods generally log failures instead of throwing them further.

9. Licensing

The source is distributed under the GNU General Public License version 2 or any later version.

The source header identifies:

Copyright 2012-2018 Tony George <teejeetech@gmail.com>