File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
src/main/java/com/example Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 3131 <dependency >
3232 <groupId >com.featurevisor</groupId >
3333 <artifactId >featurevisor-java</artifactId >
34- <version >0.0.6 </version >
34+ <version >0.0.8 </version >
3535 </dependency >
3636 <dependency >
3737 <groupId >com.fasterxml.jackson.core</groupId >
Original file line number Diff line number Diff line change 11package com .example ;
22
3- import com .featurevisor .sdk .Instance ;
4- import com .featurevisor .types .DatafileContent ;
3+ import com .featurevisor .sdk .Featurevisor ;
54
65import java .net .URI ;
76import java .net .http .HttpClient ;
@@ -15,15 +14,8 @@ public static void main(String[] args) {
1514 String jsonContent = fetchJsonFromUrl ("https://featurevisor-example-cloudflare.pages.dev/production/featurevisor-tag-all.json" );
1615 System .out .println ("Fetched JSON content" );
1716
18- // Parse JSON string to DatafileContent
19- DatafileContent datafileContent = DatafileContent .fromJson (jsonContent );
20- System .out .println ("Parsed DatafileContent successfully" );
21-
2217 // Create Featurevisor SDK instance with the datafile content
23- Instance instance = new Instance (
24- new Instance .InstanceOptions ()
25- .datafile (datafileContent )
26- );
18+ Featurevisor instance = Featurevisor .createInstance (jsonContent );
2719
2820 // evaluate feature
2921 boolean isFeatureEnabled = instance .isEnabled ("my_feature" );
You can’t perform that action at this time.
0 commit comments