Hyperfoil

json

Parses JSON responses using simple queries.

Property Type Description
delete boolean If this is set to true, the selected key will be deleted from the JSON and the modified JSON will be passed to the processor.
format enum Conversion to apply on the matching parts with ‘toVar’ or ‘toArray’ shortcuts.
Options:
  • BYTEBUF: Store the buffer directly. Beware that this may cause memory leaks!
  • BYTES: Store data as byte array.
  • STRING: Interprets the bytes as UTF-8 string.
processor Processor.Builder If neither delete or replace was set this processor will be called with the selected parts. In the other case the processor will be called with chunks of full (modified) JSON. <p> Note that the processor.before() and processor.after() methods are called only once for each request, not for the individual filtered items.
query String Query selecting the part of JSON.
replace String Replace value of selected item with value generated through a pattern. Note that the result must contain quotes and be correctly escaped.
replace (alternative) Transformer.Builder Custom transformation executed on the value of the selected item. Note that the output value must contain quotes (if applicable) and be correctly escaped.
toArray String Shortcut to store selected parts in an array in the session. Must follow the pattern variable[maxSize]
toVar String Shortcut to store first match in given variable. Further matches are ignored.
unquote boolean Automatically unquote and unescape the input values. By default true.

replace

Custom transformation executed on the value of the selected item. Note that the output value must contain quotes (if applicable) and be correctly escaped.

Property Type Description
actions ActionsTransformer.Builder This transformer stores the (defragmented) input into a variable, using requested format. After that it executes all the actions and fetches transformed value using the pattern.

replace.actions

This transformer stores the (defragmented) input into a variable, using requested format. After that it executes all the actions and fetches transformed value using the pattern.

Property Type Description
actions Action.Builder <no description>
format enum Format into which should this transformer convert the buffers before storing. Default is STRING.
Options:
  • BYTEBUF: Store the buffer directly. Beware that this may cause memory leaks!
  • BYTES: Store data as byte array.
  • STRING: Interprets the bytes as UTF-8 string.
pattern <unknown> <no description>
var String Variable used as the intermediate storage for the data.