Skip to content

Commit a27717e

Browse files
committed
init commit
1 parent 1406e09 commit a27717e

File tree

13 files changed

+634
-0
lines changed

13 files changed

+634
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
wandb/*
2+
target/*

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-ng-java.iml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4" />

pom.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.wandb.client</groupId>
8+
<artifactId>client-ng-java</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<dependencies>
12+
<dependency>
13+
<groupId>io.grpc</groupId>
14+
<artifactId>grpc-netty-shaded</artifactId>
15+
<version>1.30.2</version>
16+
</dependency>
17+
<dependency>
18+
<groupId>io.grpc</groupId>
19+
<artifactId>grpc-protobuf</artifactId>
20+
<version>1.30.2</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>io.grpc</groupId>
24+
<artifactId>grpc-stub</artifactId>
25+
<version>1.30.2</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.apache.tomcat</groupId>
29+
<artifactId>annotations-api</artifactId>
30+
<version>6.0.53</version>
31+
<scope>provided</scope>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>org.json</groupId>
36+
<artifactId>json</artifactId>
37+
<version>20200518</version>
38+
</dependency>
39+
</dependencies>
40+
41+
<properties>
42+
<maven.compiler.source>1.8</maven.compiler.source>
43+
<maven.compiler.target>1.8</maven.compiler.target>
44+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45+
</properties>
46+
47+
<build>
48+
<extensions>
49+
<extension>
50+
<groupId>kr.motd.maven</groupId>
51+
<artifactId>os-maven-plugin</artifactId>
52+
<version>1.6.2</version>
53+
</extension>
54+
</extensions>
55+
56+
<plugins>
57+
<plugin>
58+
<groupId>org.xolstice.maven.plugins</groupId>
59+
<artifactId>protobuf-maven-plugin</artifactId>
60+
<version>0.6.1</version>
61+
<configuration>
62+
<protocArtifact>com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}</protocArtifact>
63+
<pluginId>grpc-java</pluginId>
64+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.30.2:exe:${os.detected.classifier}</pluginArtifact>
65+
</configuration>
66+
<executions>
67+
<execution>
68+
<goals>
69+
<goal>compile</goal>
70+
<goal>compile-custom</goal>
71+
</goals>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.wandb.client;
2+
3+
import org.json.JSONObject;
4+
5+
import java.util.ArrayList;
6+
import java.util.HashSet;
7+
import java.util.List;
8+
import java.util.Set;
9+
10+
public class JSONItem {
11+
12+
static public List<JSONItem> fromJson(JSONObject json) {
13+
List<JSONItem> items = new ArrayList<>();
14+
for (String key: json.keySet()) {
15+
items.add(new JSONItem(key, json.get(key)));
16+
}
17+
return items;
18+
}
19+
20+
private String key;
21+
private String value;
22+
private Set<String> nested;
23+
24+
private JSONItem(String key, Object value) {
25+
this.nested = new HashSet<>();
26+
this.value = value.toString();
27+
}
28+
29+
public String getKey() {
30+
return key;
31+
}
32+
33+
public String getValue() {
34+
return value;
35+
}
36+
}

0 commit comments

Comments
 (0)