Yonas Habteab
ccf4eebc3d
Make ValueGenerator
more flexible & easy to use
...
This commit refactors the ValueGenerator class to be a template that can
work with any container type. Previously, one has to manually take care
of the used container by lazily iterating over it within a lambda. Now,
the `ValueGenerator` class itself takes care of all the iteration,
making it easier to use and less error-prone. The new base `Generator`
class is required to allow the `JsonEncoder` to handle generators in a
type-erased manner.
2025-09-16 14:04:56 +02:00
Yonas Habteab
82b80e24c1
fix comment
2025-07-11 14:05:54 +02:00
Yonas Habteab
2461e0415d
Introduce JsonEncode
helper function
...
It's just a wrapper around the `JsonEncoder` class to simplify its usage.
2025-07-10 18:09:21 +02:00
Alexander A. Klimov
fa2666fecf
JsonEncode(): encode non-[]/{} objects as strings, not null
...
... to represent function custom vars as such in Icinga DB.
2021-04-30 15:49:52 +02:00
Alexander A. Klimov
9531de3835
JsonEncode(): serialize integers w/o trailing .0
...
... so Icinga DB can parse them as integers.
2021-03-23 17:52:37 +01:00
Alexander A. Klimov
3adba5c542
JsonEncode(): suffix pretty JSON w/ \n
...
refs #8194
2020-09-02 16:11:43 +02:00
Michael Friedrich
76b9cd6786
Fix missing include in JSON tests
...
Non-unity builds require the additional header.
2019-03-18 17:02:12 +01:00
Alexander A. Klimov
c4333b49f5
Test Json{En,De}code()
2019-03-18 15:07:57 +01:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Insel
158ae2188e
Change copyright header for 2018
2018-01-02 12:08:55 +01:00
Gunnar Beutner
df8266631d
Replace boost::tuple with std::tuple
2017-11-30 17:41:02 +01:00
Michael Friedrich
79dcb789c2
Move PerfdataValue() class into base library
...
This is required for libremote and ApiListener stats in #5133
2017-05-15 16:32:29 +02:00
Michael Friedrich
b7caf0820d
Ensure that *.icinga.com is used everywhere
...
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
1dc4ab367e
Fix: Unit tests randomly crash after the tests have completed
...
fixes #12610
2016-09-07 08:25:53 +02:00
Gunnar Beutner
288413f046
Replace BOOST_FOREACH with range-based for loops
...
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner
599929b0f6
Update copyright headers for 2016
2016-01-12 08:29:59 +01:00
Michael Friedrich
78bfd0204c
Update copyright year
2015-01-22 12:00:23 +01:00
Gunnar Beutner
7559273359
Replace cJSON with YAJL
...
fixes #7452
2014-10-26 20:00:35 +01:00