unify jvalue traversal

:Release Notes:
Implement a generic jvalue traverse.
Refactor the code.

:Detailed Notes:
Implement a generic jvalue traverse.
Add yajl_dont_validate_strings for yajl-2.
Rid of dynamic memory allocation of validator.
Correct use of snprintf.
Make a little test modification of double type.

:Testing Performed:
Gtest

:QA Notes:

:Issues Addressed:
[BHV-1560] Unify jvalue traversal (used in jvalidation.c jparse_stream.c)

Open-webOS-DCO-1.0-Signed-off-by: Andrii Zora <andrii.zora@lge.com>

Change-Id: Iacb6417f9d4fff3f2ad90535d09410d7738c83c5
Reviewed-on: https://g2g.palm.com/5014
Reviewed-by: DCO Verification
Reviewed-by: Andrii Zora <andrii.zora@lge.com>
Tested-by: Andrii Zora <andrii.zora@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Log using new pmloglib API

:Release Notes:
Changed to use new key-value pmloglib API.

:Detailed Notes:
To use PmLogLib key-value logging, user application can
be linked with PmLogLib library. This will enable logging
with PmLogLib automatically.

:Testing Performed:
Unit-tests. MiniBAT.

:QA Notes:

:Issues Addressed:
[BHV-8] pbnjson: Refactor logging to use pmloglib

Open-webOS-DCO-1.0-Signed-off-by: Alexandr Smoktal <alexandr.smoktal@lge.com>

Change-Id: Ie3a762963aa6cbe0be4731e7656736afaea7d4df
Reviewed-on: https://g2g.palm.com/4741
Reviewed-by: DCO Verification
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Tested-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
fix PJ_LOG_DBG, logging stub and weak magic

:Release Notes:
Made test run successfully without linking with pmloglib

:Detailed Notes:
- Moved liblog.c to be compiled directly as a part of shared library.
  Otherwise unexplained segfault happens when it comes from shared
  library jvalue.
- Fixed usage and define of PJ_LOG_DBG macro.
- Fixed stub for _PmLogMsgKV

:Testing Performed:
Unit-tests.

:QA Notes:

:Issues Addressed:
[BHV-8] pbnjson: Refactor logging to use pmloglib

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: I6ffc5c1af487b58db058665077622e70f2c9c008
Reviewed-on: https://g2g.palm.com/5174
Reviewed-by: DCO Verification
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Tested-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Factor out the mempool into its own source file

:Release Notes:
Extract the source code of the memory pool into its own file,
create unit tests for it.

:Detailed Notes:
Extract memory pool to parser_memory_pool.
Create unit tests TestParserMemPool.
Change size of the pool.

:Testing Performed:
Unit tests

:QA Notes:

:Issues Addressed:
[BHV-2369] pbnjson: Factor out the mempool into its own source file

Open-webOS-DCO-1.0-Signed-off-by: Andrii Zora <andrii.zora@lge.com>

Change-Id: I478c292522fbc319f7c8f1b14148b1986f78113a
Reviewed-on: https://g2g.palm.com/5203
Reviewed-by: DCO Verification
Reviewed-by: Andrii Zora <andrii.zora@lge.com>
Tested-by: Andrii Zora <andrii.zora@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
factor out schema builder

:Release Notes:
Prepare code infrastructure to provide new API

:Detailed Notes:
- factored out builder
- TODO: drop mentioning of yajl
- TODO: expose schema builder and parsing callbacks in public API

:Testing Performed:
unit-tests

:QA Notes:

:Issues Addressed:
[BHV-3085] Provide pbnjson API for schema construction from jvalue

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: I39e30dc9b39ae06d1dd53287a247f871eded7234
Reviewed-on: https://g2g.palm.com/5078
Reviewed-by: DCO Verification
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Tested-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
transform yajl callbacks to schema builder methods

:Release Notes:
Prepare code infrastructure to provide new API

:Detailed Notes:
- move yajl callbacks for schema parsing to schema_build.c as visitor
  methods
- drop mentioning of yajl
- TODO: expose schema builder and parsing callbacks in public API

:Testing Performed:
unit-tests

:QA Notes:

:Issues Addressed:
[BHV-3085] Provide pbnjson API for schema construction from jvalue

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: I131e61a0848e62dc744abef3e280909e2798c58f
Reviewed-on: https://g2g.palm.com/5088
Reviewed-by: DCO Verification
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Tested-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
introduce schema building by traversing jvalue

:Release Notes:
New API to parse schema from jvalue.

:Detailed Notes:
- tie together jtraverse and jschema_builder
- expose schema builder and parsing callbacks in public API
- add unit-tests for parsing schema from jvalue

:Testing Performed:
unit-tests

:QA Notes:

:Issues Addressed:
[BHV-3085] Provide pbnjson API for schema construction from jvalue

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: Ica96a9e7e6826487996e66e63785c49df2e6816c
Reviewed-on: https://g2g.palm.com/5145
Reviewed-by: DCO Verification
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Tested-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Provide JSON value type in C++ API

:Release Notes:
Provide getType() method for JSON value.

:Detailed Notes:
Add getType() method to JValue class.
Add new method to unit tests.

:Testing Performed:
Unit tests

:QA Notes:

:Issues Addressed:
[BHV-36] pbnjson: Provide JSON value type in C++ API

Open-webOS-DCO-1.0-Signed-off-by: Andrii Zora <andrii.zora@lge.com>

Change-Id: Ib326b95df46d75bcd3d9647dbb4a29d6cf1ab3cc
Reviewed-on: https://g2g.palm.com/5224
Reviewed-by: DCO Verification
Reviewed-by: Andrii Zora <andrii.zora@lge.com>
Tested-by: Andrii Zora <andrii.zora@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Add NO_LOGGING flag to disable logging

:Release Notes:
Add NO_LOGGING cmake flag to allow building
without any logging, to avoid PmLogLib dependency.

:Detailed Notes:

:Testing Performed:
Unit-tests.

:QA Notes:

:Issues Addressed:
[BHV-8] pbnjson: Refactor logging to use pmloglib

Open-webOS-DCO-1.0-Signed-off-by: Alexandr Smoktal <alexandr.smoktal@lge.com>

Change-Id: Ie034c50d6120ced7e5806df0ec1e8e126c38361e
Reviewed-on: https://g2g.palm.com/5177
Reviewed-by: DCO Verification
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Tested-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Create skeleton for pbnjson_validate

:Release Notes:
Implement command line parsing.

:Detailed Notes:

:Testing Performed:
Build succeeded

:QA Notes:

:Issues Addressed:
[BHV-2621] Develop a command line tool to validate JSON against schema

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I37a4fb455477843637dd850103d89a829a1d0e14
Reviewed-on: https://g2g.palm.com/5469
Reviewed-by: DCO Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Reviewed-by: Andrii Zora <andrii.zora@lge.com>
Allow reporting schema parsing errors in C++

:Release Notes:
Allow specifying error callbacks for JSchemaFile.

:Detailed Notes:

:Testing Performed:
Build and unit tests

:QA Notes:

:Issues Addressed:
[BHV-2621] Develop a command line tool to validate JSON against schema

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: Id29a80c6bbfb719c66fa6274706e791fb5073e53
Reviewed-on: https://g2g.palm.com/5470
Reviewed-by: DCO Verification
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Reviewed-by: Oleksii Rudenko <oleksii.rudenko@lge.com>
Tested-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Implement JSON validation in the pbnjson_validate

:Release Notes:
Parse JSON to validate against a schema

:Detailed Notes:

:Testing Performed:
Build succeeded, smoke test.

:QA Notes:

:Issues Addressed:
[BHV-2621] Develop a command line tool to validate JSON against schema

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I0b74b95ffc3bd762459b60313e8eaca4f3cf327a
Reviewed-on: https://g2g.palm.com/5471
Reviewed-by: DCO Verification
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Tested-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Resolve referred schemas right after parsing

:Release Notes:
Perform resolving references process right after the schema parsing

:Detailed Notes:
change the API
change unit tests

:Testing Performed:
Unit tests

:QA Notes:

:Issues Addressed:
[BHV-1564] Resolve referred schemas right after parsing

Open-webOS-DCO-1.0-Signed-off-by: Andrii Zora <andrii.zora@lge.com>

Change-Id: Id9012b319af14deb10819b8fb9435dc48841410e
Reviewed-on: https://g2g.palm.com/5426
Reviewed-by: DCO Verification
Reviewed-by: Sergiy Kryvonos <sergiy.kryvonos@lge.com>
Reviewed-by: Andrii Zora <andrii.zora@lge.com>
Tested-by: Andrii Zora <andrii.zora@lge.com>
Reviewed-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Merge branch bhv-2621-validator into master

:Release Notes:
Parse JSON to validate against a schema

:Detailed Notes:
Conflicts:
	include/public/pbnjson/cxx/JSchemaFile.h
	src/pbnjson_cxx/JSchemaFile.cpp

:Testing Performed:
Unit tests, starfish build

:QA Notes:

:Issues Addressed:
[BHV-2621] Develop a command line tool to validate JSON against schema

Open-webOS-DCO-1.0-Signed-off-by: Andrii Zora <andrii.zora@lge.com>

Change-Id: Id4f72f76496b03ace94b07e2de521b6893aa0f31