@@ -303,15 +303,64 @@ f.<MyCustomClass>getVariableObject(featureKey, variableKey, context);
303303
304304f. < Map<String , Object > > getVariableJSON(featureKey, variableKey, context);
305305f. < MyCustomClass > getVariableJSON(featureKey, variableKey, context);
306+ f. getVariableJSONNode(featureKey, variableKey, context);
306307```
307308
309+ For strongly typed decoding, additional overloads are available:
310+
311+ ``` java
312+ import com.fasterxml.jackson.core.type.TypeReference ;
313+
314+ // Array decoding using Class<T>
315+ List<MyItem > items = f. getVariableArray(featureKey, variableKey, context, MyItem . class);
316+
317+ // Array decoding using TypeReference
318+ List<Map<String , Object > > rows = f. getVariableArray(
319+ featureKey,
320+ variableKey,
321+ context,
322+ new TypeReference<List<Map<String , Object > > > () {}
323+ );
324+
325+ // Object decoding using Class<T>
326+ MyConfig config = f. getVariableObject(featureKey, variableKey, context, MyConfig . class);
327+
328+ // Object decoding using TypeReference
329+ Map<String , List<MyConfig > > nested = f. getVariableObject(
330+ featureKey,
331+ variableKey,
332+ context,
333+ new TypeReference<Map<String , List<MyConfig > > > () {}
334+ );
335+ ```
336+
337+ Typed overloads are additive and non-breaking. If decoding fails for the requested target type, these methods return ` null ` .
338+
339+ For dynamic JSON values with unknown shape, use ` getVariableJSONNode ` :
340+
341+ ``` java
342+ import com.fasterxml.jackson.databind.JsonNode ;
343+
344+ JsonNode node = f. getVariableJSONNode(featureKey, variableKey, context);
345+
346+ if (node != null && node. isObject()) {
347+ String nested = node. path(" key" ). path(" nested" ). asText(null );
348+ }
349+ ```
350+
351+ If a variable schema type is ` json ` and the resolved value is a malformed stringified JSON, JSON parsing fails safely and these methods return ` null ` :
352+
353+ - ` getVariable(...) `
354+ - ` getVariableJSONNode(...) `
355+ - ` getVariableJSON(...) `
356+
308357## Getting all evaluations
309358
310359You can get evaluations of all features available in the SDK instance:
311360
312361``` java
313- import com.featurevisor.types .EvaluatedFeatures ;
314- import com.featurevisor.types .EvaluatedFeature ;
362+ import com.featurevisor.sdk .EvaluatedFeatures ;
363+ import com.featurevisor.sdk .EvaluatedFeature ;
315364
316365EvaluatedFeatures allEvaluations = f. getAllEvaluations(context);
317366
@@ -690,6 +739,7 @@ Similar to parent SDK, child instances also support several additional methods:
690739- ` getVariableArray `
691740- ` getVariableObject `
692741- ` getVariableJSON `
742+ - ` getVariableJSONNode `
693743- ` getAllEvaluations `
694744- ` on `
695745- ` close `
@@ -717,9 +767,16 @@ $ mvn exec:java -Dexec.mainClass="com.featurevisor.cli.CLI" -Dexec.args="test --
717767Additional options that are available:
718768
719769``` bash
720- $ mvn exec:java -Dexec.mainClass=" com.featurevisor.cli.CLI" -Dexec.args=" test --projectDirectoryPath=/absolute/path/to/your/featurevisor/project --quiet --onlyFailures --keyPattern=myFeatureKey --assertionPattern=#1"
770+ $ mvn exec:java -Dexec.mainClass=" com.featurevisor.cli.CLI" -Dexec.args=" test --projectDirectoryPath=/absolute/path/to/your/featurevisor/project --quiet --onlyFailures --keyPattern=myFeatureKey --assertionPattern=#1 --with-tags --with-scopes --showDatafile --schemaVersion=2 --inflate=1 "
721771```
722772
773+ Scoped and tagged test behavior mirrors the JavaScript tester:
774+
775+ - ` --with-tags ` : builds and tests assertions against tagged datafiles.
776+ - ` --with-scopes ` : builds scoped datafiles and tests scoped assertions against those scoped files.
777+ - without ` --with-scopes ` : scoped assertions still run by merging scope context into assertion context (fallback behavior).
778+ - if both ` scope ` and ` tag ` are present in an assertion, scope datafile takes precedence.
779+
723780### Benchmark
724781
725782Learn more about benchmarking [ here] ( https://featurevisor.com/docs/cli/#benchmarking ) .
0 commit comments