Stringified Value Format: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
QPR ProcessAnalyzer uses the '''stringified value format''' in [[Filtering_in_QPR_ProcessAnalyzer_Queries|filters]] when they are defined using the JSON format. The stringified format encodes data of different types into a string format. This conversion is needed because a pure JSON only supports strings, numbers and booleans.
QPR ProcessAnalyzer uses the '''stringified value format''' in [[Filtering_in_QPR_ProcessAnalyzer_Queries|filters]] and [[Web_API:_Expression/query|expression queries]] for values appearing in JSON format. The stringified format encodes different types of data into strings that captures both the type and value of the data. The first character in the stringified format represents the type of the data.


The stringification is done for each data type according to following rules:
The stringification is done for each data type according to following rules:
Line 14: Line 14:
* (empty string) -> 0
* (empty string) -> 0
|-
|-
||decimal number
||decimal number (float)
||1<decimal value>
||1<decimal value>
||
||
Line 20: Line 20:
* 0.1 -> 10.1
* 0.1 -> 10.1
* 0.0 -> 10.0
* 0.0 -> 10.0
* -1.456 -> 0-1.456
* -1.456 -> 1-1.456
* 2.9E5 -> 12.9E5
* -0.16E12 -> 1-0.16E12
|-
|-
||date
||date
Line 32: Line 34:
||
||
|-
|-
||small integer
||small integer (maximum 2 147 483 647)
||4<number value>
||4<number value>
||
||
Line 41: Line 43:
||5<number value>
||5<number value>
||
||
* 3000000000 -> 53000000000
* -12345678900 -> 5-12345678900
|-
|-
||boolean
||boolean
Line 46: Line 50:
||
||
|-
|-
||timespan
||timespan (duration)
||7d.HH:mm:ss.fff
||7d.HH:mm:ss.fff
||
||
Line 52: Line 56:
* 6 hours -> 70.06:00:00.000
* 6 hours -> 70.06:00:00.000
* 1.3 seconds -> 70.00:00:01.300
* 1.3 seconds -> 70.00:00:01.300
* -43 minutes -> 7-0.00:43:00.000
|-
||array
||[ ... ] (same as JSON array where each item uses the stringified format)
||
* empty array -> []
* array with string "a" ->  ["0a"]
* array with integers 1 and 2 -> ["41", "42"]
|}
|}


[[Category: QPR ProcessAnalyzer]]
[[Category: QPR ProcessAnalyzer]]

Latest revision as of 17:02, 4 April 2025

QPR ProcessAnalyzer uses the stringified value format in filters and expression queries for values appearing in JSON format. The stringified format encodes different types of data into strings that captures both the type and value of the data. The first character in the stringified format represents the type of the data.

The stringification is done for each data type according to following rules:

Data type Format Example
string 0<string value>
  • Patricia White -> 0Patricia White
  • 321 -> 0321
  • (empty string) -> 0
decimal number (float) 1<decimal value>
  • 74.435 -> 174.435
  • 0.1 -> 10.1
  • 0.0 -> 10.0
  • -1.456 -> 1-1.456
  • 2.9E5 -> 12.9E5
  • -0.16E12 -> 1-0.16E12
date 2yyyy-MM-ddTHH:mm:ss.fff
  • 1st of July 2018 -> 22018-07-01T00:00:00.000
  • 12th of October 2021 at 08:34 -> 22021-10-12T08:34:00.000
null value 3
small integer (maximum 2 147 483 647) 4<number value>
  • 1234 -> 41234
  • -300 -> 4-300
large integer 5<number value>
  • 3000000000 -> 53000000000
  • -12345678900 -> 5-12345678900
boolean 6True or 6False
timespan (duration) 7d.HH:mm:ss.fff
  • 2 days -> 72.00:00:00.000
  • 6 hours -> 70.06:00:00.000
  • 1.3 seconds -> 70.00:00:01.300
  • -43 minutes -> 7-0.00:43:00.000
array [ ... ] (same as JSON array where each item uses the stringified format)
  • empty array -> []
  • array with string "a" -> ["0a"]
  • array with integers 1 and 2 -> ["41", "42"]