Oyranos  git-devel
Oyranos is a full featured Color Management System
Modules | Functions
Oyranos JSON Library
Collaboration diagram for Oyranos JSON Library:

Modules

 OyjlCore
 Internationalisation, Terminal colors, I/O and String Handling.
 
 OyjlTree JSON Parsing and Tree Handling
 Tree data structure manipulation and I/O.
 
 Oyjl_args
 
 OyjlTest Code and Tools Testing
 API testing for prototyping and regression checking in CI.
 

Functions

const char * oyjlVersionName (int vtype)
 give the compiled in library version More...
 
void oyjlLibRelease ()
 Reset and free all resources. More...
 
int oyjlVersion (int vtype)
 give the compiled in library version More...
 
int oyjlInitLanguageDebug (const char *project_name, const char *env_var_debug, int *debug_variable, int use_gettext OYJL_UNUSED, const char *env_var_locdir OYJL_UNUSED, const char *default_locdir OYJL_UNUSED, oyjlTranslation_s **context, oyjlMessage_f msg)
 init the libraries language; optionaly More...
 

Detailed Description

Basic low level API's

Introduction

Oyjl API provides a platformindependent C interface for JSON I/O, conversion to and from XML + YAML, string helpers, file reading, testing and argument handling.

The API's are quite independent.

API Documentation

The API of the Oyranos JSON Library is declared in the oyjl.h header file.

Tools Documentation

Oyjl comes with a few tools, which use the Oyjl API's.

Function Documentation

◆ oyjlInitLanguageDebug()

int oyjlInitLanguageDebug ( const char *  project_name,
const char *  env_var_debug,
int *  debug_variable,
int use_gettext  OYJL_UNUSED,
const char *env_var_locdir  OYJL_UNUSED,
const char *default_locdir  OYJL_UNUSED,
oyjlTranslation_s **  context,
oyjlMessage_f  msg 
)

init the libraries language; optionaly

Additionally use setlocale() to obtain locale in your application. The message catalog search path is detected from the project specific environment variable specified in env_var_locdir and the LOCPATH environment variables. If those are not present a expected fall back directory from default_locdir is used.

Parameters
project_nameproject name display string; e.g. "MyProject"
env_var_debugenvironment debug variable string; e.g. "MP_DEBUG"
debug_variableint C variable; e.g. my_project_debug
use_gettextswitch gettext support on or off
env_var_locdirenvironment variable string for locale path; e.g. "MP_LOCALEDIR"
default_locdirdefault locale path C string; e.g. "/usr/local/share/locale"
contextlocale, domain and possibly more information; use oyjlTranslation_New()
  • domain: po and mo files; e.g. "myproject"
msgyour message function of type oyjlMessage_f; optional - default is Oyjl message function
Returns
error
  • -1 : issue
  • 0 : success
  • >= 1 : found error
Version
Oyjl: 1.0.0
Date
2019/01/13
Since
2019/01/13 (Oyjl: 1.0.0)

◆ oyjlLibRelease()

void oyjlLibRelease ( )

Reset and free all resources.

◆ oyjlVersion()

int oyjlVersion ( int  vtype)

give the compiled in library version

Parameters
[in]vtyperequest API type
  • 0 - Oyjl API
  • 1 - Yajl API
Returns
OYJL_VERSION at library compile time

◆ oyjlVersionName()

const char * oyjlVersionName ( int  vtype)

give the compiled in library version

Parameters
[in]vtyperequest API type
  • 0 - Oyjl version string
  • 1 - GIT version string
Returns
OYJL_VERSION_NAME at library compile time

References OYJL_GIT_VERSION.