Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#323 Scaffolding for YAML 'loading' #630

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/main/java/com/amihaiemil/eoyaml/YamlMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -518,4 +518,17 @@ default List<YamlNode> children() {
default JsonObject toJsonObject() {
return (JsonObject) this.accept(new YamlToJsonVisitor());
}

/**
* Turn this YamlMapping to a given Object type ("loading").
* @param clazz Class type of the Object into which this YamlMapping should
* be loaded.
* @param <T> Type of the Object,
* @return Object into which this YamlMapping is loaded.
* @todo #323:60min Implement this method similarly to toJsonObject(),
* using a visitor.
*/
default <T> T toObject(final Class<T> clazz) {
return null;
}
}
Loading