Skip to content

Allow (de)serialization of Maps #318

Closed

Description

@Astralchroma

Current work arround is to have a wrapper which works fine, but results in a slightly less clean configuration file.

Activity

  1. zml2008 commented on Aug 29, 2022

    @zml2008
    Member

    you should be anle to deserialize maps just fine, what is your issue?

  2. Astralchroma commented on Aug 29, 2022

    @Astralchroma
    Author
    org.spongepowered.configurate.serialize.SerializationException: [] of type java.util.Map: Raw types are not supported
    	at org.spongepowered.configurate.AbstractConfigurationNode.get(AbstractConfigurationNode.java:127) ~[configurate-core-4.1.2.jar:?]
    	at org.spongepowered.configurate.ConfigurationNode.get(ConfigurationNode.java:520) ~[configurate-core-4.1.2.jar:?]
    	at net.horizonsend.ion.server.managers.PlanetsManager.<init>(PlanetsManager.kt:28) ~[Ion.jar:?]
    	at net.horizonsend.ion.server.IonServer.onEnable(IonServer.kt:135) ~[Ion.jar:?]
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-135]
    	at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-135]
    	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:279) ~[paper-1.19.2.jar:git-Paper-135]
    	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1126) ~[paper-1.19.2.jar:git-Paper-135]
    	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-135]
    
  3. zml2008 commented on Aug 29, 2022

    @zml2008
    Member

    the issue you are having there is that you need to provide type parameters - look at the TypeToken overload.

  4. locked and limited conversation to collaborators on Aug 29, 2022
  5. converted this issue into a discussion #319 on Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions