Show / Hide Table of Contents

Smartcrypt Protocol

The Smartcrypt Protocol component provides the buildings blocks for communicating with the server. These blocks aren't particularly useful on their own, but can be helpful in testing and customizing certain SDK behaviors.

Caution

While the code in this package is stable, the APIs are still considered beta and are subject to change. If using classes or methods from this package, expect them to break and possibly disappear entirely in a future release.

Canonical Smartcrypt JSON Format

Smartcrypt uses a more restrictive flavor of JSON in many of its communications. Examples of restrictions include alphabetical ordering of JSON entries, and the ellision of default values, such as 0 for numbers and null for objects, arrays, and strings.

Working with canonical Smartcrypt JSON Format

This component provides tools for encoding and decoding in the canonical Smartcrypt JSON Format via the JsonProvider.

A common task is to extract data from JSON representations of protocol entities.


public static long GetDeviceIdFromJson(string json)
{
  var device = JsonProvider.Decode<Device>(json);
  return device.id;
}

Back to top Copyright © 2018 PKWARE, Inc.