Skip to main content

Helper functions for working with Senzing JSON

Project description

sz-sdk-json-type-definition

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!

:warning: WARNING: sz-sdk-json-type-definition is still in development :warning: _

At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x. Although it can be reviewed and commented on, the recommendation is not to use it yet.

Synopsis

The Senzing sz-sdk-json-type-definition uses JSON Type Definition to model the JSON that is returned from Senzing SDK calls.

Code generated from this model improves compile-time type checking and code-completion in Integrated Development Environments (IDE) (e.g. "VSCode's IntelliSense").

Overview

By using the code generated by JSON Type Definition, JSON returned by the Senzing SDK calls are easier to parse. Examples:

  1. Python - main.py
  2. Go - main.go
  3. Java - Main.java
  4. Typescript - main.ts
  5. C-sharp Program.cs

The actual specification is senzingsdk-RFC8927.json.

From this specification, code is generated for the following languages:

  1. csharp
  2. go
  3. java
  4. python
  5. ruby
  6. rust
  7. typescript

Use

  1. Python comparison:
    1. Here's how to parse a Senzing JSON response without senzing-json:

      result = sz_engine.get_virtual_entity_by_record_id(record_keys, flags)
      feature_list = result.get("RESOLVED_ENTITY", {}).get("FEATURES", {}).get("NAME", [])
      
      1. Note that the JSON keys and datatypes of the values must be known ahead of time. Also, this method is subject to typographical errors.
    2. Here's how to parse a Senzing JSON response with senzing-json:

      result = sz_engine.get_virtual_entity_by_record_id(record_keys, flags)
      virtual_entity = SzEngineGetVirtualEntityByRecordIDResponse.from_json_data(result)
      feature_list = virtual_entity.resolved_entity.features["NAME"]
      
      1. When using an IDE, the fields and datatypes are supplied by the IDE's code-completion. Typos will be flagged by the IDE.

References

  1. Development
  2. Errors
  3. Examples
  4. Packages
    1. Go package reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

senzing_typedef-0.2.12.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

senzing_typedef-0.2.12-py3-none-any.whl (149.5 kB view details)

Uploaded Python 3

File details

Details for the file senzing_typedef-0.2.12.tar.gz.

File metadata

  • Download URL: senzing_typedef-0.2.12.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for senzing_typedef-0.2.12.tar.gz
Algorithm Hash digest
SHA256 d903fd5fdc6edeadb7671382012dd2cd9098bd6e7cc9af5217a5c7297c9edf79
MD5 fbaa8de26588c320aa04a633a17f98da
BLAKE2b-256 b7b2d82cd789b884fb2b95918db7a4bb7364d2e679ef90716f5834fb851e0bd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for senzing_typedef-0.2.12.tar.gz:

Publisher: publish-to-pypi.yaml on senzing-garage/sz-sdk-json-type-definition

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file senzing_typedef-0.2.12-py3-none-any.whl.

File metadata

File hashes

Hashes for senzing_typedef-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 6f06d5f4b5de321c93f66f30734194c61bfa2868c781b1a818fddd27aff4b2e9
MD5 7c85098b8ab8067d68e0b2ba07e4fa74
BLAKE2b-256 1e181d159772f2b84df0098b5c74a47ec6e8bc04a8336e0535482a5908d663e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for senzing_typedef-0.2.12-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on senzing-garage/sz-sdk-json-type-definition

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page