get_license_info_as_json
Returns information about your File Content Extraction license, in JSON format.
This function can be used to determine whether a license key is valid or has expired.
Syntax
std::string get_license_info_as_json(const std::string& license);
Arguments
license
|
A File Content Extraction license key. |
Discussion
A JSON schema for the license information is included in the schemas folder of the SDK. OpenText recommends that you consult the schema for information about the fields.
The following is an example response for a valid license that expires on 01 May 2026 (292 days in the future when the function was called).
{
"Status": "Valid",
"ExpiryDate": "2026-05-01T00:00:00Z",
"ExpiryDays": "292",
"ExpiryEpochSeconds": 1777593600
}
Example
The following example obtains information about a license key and prints it to the console.
#include <iostream>
#include "Keyview_License.hpp"
int main()
{
auto licenseParser = keyview::LicenseParser{"LINUX_X86_64/bin/"};
std::string licenseKey = "YOUR_LICENSE_HERE";
std::cout << licenseParser.get_license_info_as_json(licenseKey) << "\n";
}