From 4e2554ad1890a4bf9e9abe4ac9e68f14be61ecca Mon Sep 17 00:00:00 2001 From: ruri Date: Tue, 21 May 2019 16:08:37 +0200 Subject: [PATCH] Added option for parsing JSON via JTokens (thanks ewwink). --- OpenBullet/LSDoc.xml | 2 +- .../Pages/StackerBlocks/PageBlockParse.xaml | 1 + OpenBullet/SyntaxHelper.xml | 2 +- RuriLib/Blocks/BlockParse.cs | 25 +++++++++++++++---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/OpenBullet/LSDoc.xml b/OpenBullet/LSDoc.xml index 4bcc3be..4b0fa67 100644 --- a/OpenBullet/LSDoc.xml +++ b/OpenBullet/LSDoc.xml @@ -323,7 +323,7 @@ This will spawn and execute a Parse Block. Syntax: PARSE "TARGET" LR "LEFT" "RIGHT" [Recursive?] [EncodeOutput?] [CreateEmpty?] [UseRegexLR?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"] PARSE "TARGET" CSS "SELECTOR" "ATTRIBUTE" [INDEX / Recursive?] [EncodeOutput?] [CreateEmpty?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"] -PARSE "TARGET" JSON "FIELD" [Recursive?] [EncodeOutput?] [CreateEmpty?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"] +PARSE "TARGET" JSON "FIELD" [JTokenParsing?] [Recursive?] [EncodeOutput?] [CreateEmpty?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"] PARSE "TARGET" REGEX "REGEX" "OUTPUT" [Recursive?] [EncodeOutput?] [CreateEmpty?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"] Examples: diff --git a/OpenBullet/Pages/StackerBlocks/PageBlockParse.xaml b/OpenBullet/Pages/StackerBlocks/PageBlockParse.xaml index bf2643d..19a929c 100644 --- a/OpenBullet/Pages/StackerBlocks/PageBlockParse.xaml +++ b/OpenBullet/Pages/StackerBlocks/PageBlockParse.xaml @@ -125,6 +125,7 @@