-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
759 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env groovy | ||
@Grab('com.fasterxml.jackson.core:jackson-databind:2.17.0') | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
|
||
def value = new ObjectMapper().with { | ||
readValue('{"key":"Hello, World!"}', Map.class)["key"] | ||
} | ||
println value | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///usr/bin/env java "$0" "$@" ; exit $? | ||
|
||
class Prog { | ||
public static void main(String[] args) { Helper.run(); } | ||
} | ||
|
||
class Helper { | ||
static void run() { System.out.println("Hello!"); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Helper { | ||
static void run() { System.out.println("Hello!"); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
///usr/bin/env java "$0" "$@" ; exit $? | ||
|
||
class Prog { | ||
public static void main(String[] args) { Helper.run(); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///usr/bin/env jbang "$0" "$@" ; exit $? | ||
//DEPS com.fasterxml.jackson.core:jackson-databind:2.17.0 | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
|
||
def value = new ObjectMapper().with { | ||
readValue('{"key":"Hello, World!"}', Map.class) | ||
} | ||
println value["key"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
///usr/bin/env jbang "$0" "$@" ; exit $? | ||
//DEPS com.fasterxml.jackson.core:jackson-databind:2.17.0 | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import java.util.Map; | ||
|
||
class Main { | ||
public static void main(String[] args) throws Exception { | ||
ObjectMapper mapper = new ObjectMapper(); | ||
var value = mapper.readValue("{\"key\":\"Hello, World!\"}", Map.class); | ||
System.out.println(value.get("key")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
///usr/bin/env jbang "$0" "$@" ; exit $? | ||
//DEPS com.fasterxml.jackson.module:jackson-module-kotlin:2.17.0 | ||
|
||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | ||
import com.fasterxml.jackson.module.kotlin.readValue | ||
|
||
val value = jacksonObjectMapper().readValue<Map<String, String>>( | ||
"""{"key":"Hello, World!"}""" | ||
) | ||
|
||
fun main() { | ||
println(value.get("key")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env kscript | ||
|
||
@file:DependsOn("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.0") | ||
|
||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | ||
import com.fasterxml.jackson.module.kotlin.readValue | ||
|
||
val value = jacksonObjectMapper().readValue<Map<String, String>>( | ||
"""{"key":"Hello, World!"}""" | ||
) | ||
|
||
println(value["key"]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.