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

1.20.4: Failure to Convert SerializedMap to JSON String in Certain Situations #341

Open
Backas03 opened this issue Dec 24, 2024 · 1 comment
Labels

Comments

@Backas03
Copy link

Backas03 commented Dec 24, 2024

A JSONParseException occurs when converting the serialized map, read from the YAML data, into a JSON string.
foundation version: 6.5.8

item_data:
  action: "RECEIVE"
  name: "&f𣀌 &6&lInfo"
  material: PAPER
  # custom_model_data: 2022
  desc:
    - ""
    - "&7Status&8: {manufacturing_status}"
    - "&7Processed Item&8: {current_recipe_name}"
    - "&7Progress&8: &a{progression}&8/&2{complete_progression}"
    - ""
    - "&f𢀓 &b&lReward"
    - "   {current_output_reward}"
    - ""
    - "&f𣀆 &c&lFailure Condition"
    - "   &7Progress &a86400 or more"
    - ""
    # - "Additional Reward"
    # - "{current_output_extra_reward}"

StackTrace

[10:48:09 ERROR]: SigCommonCore 1.2.8 encountered a JSONParseException! Please check your error.log and report this issue with the information in that file. Running Paper 1.20.4-R0.1-SNAPSHOT and Java 21.0.5
[10:48:09 INFO]: com.signition.common.lib.fo.jsonsimple.JSONParseException: The unexpected character (c) was found at position 4. Fix the parsable string and try again.
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.jsonsimple.Yylex.yylex(Yylex.java:629)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.jsonsimple.JSONParser.lexNextToken(JSONParser.java:472)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.jsonsimple.JSONParser.deserialize(JSONParser.java:142)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.jsonsimple.JSONParser.deserialize(JSONParser.java:121)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.jsonsimple.JSONParser.deserialize(JSONParser.java:330)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.SerializeUtil.addJsonElement(SerializeUtil.java:347)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.SerializeUtil.serialize(SerializeUtil.java:223)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.lib.fo.collection.SerializedMap.toJson(SerializedMap.java:943)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.config.MachineConfigReader.readGUIListData(MachineConfigReader.java:404)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.config.MachineConfigReader.read(MachineConfigReader.java:65)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.config.MachineConfigLoader.load(MachineConfigLoader.java:56)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.config.MachineConfig.reload(MachineConfig.java:30)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.controller.MachineController.reload(MachineController.java:51)
[10:48:09 INFO]:      at SigCommonCore.jar//com.signition.common.module.machine.command.CmdMachineAdmin.lambda$onCommand$0(CmdMachineAdmin.java:117)
[10:48:09 INFO]:      at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[10:49:22 INFO]: [SigCommonCore] !-----------------------------------------------------!
[10:49:22 INFO]: [SigCommonCore]  Failed to deserialize JSON collection from string:    {current_output_reward}
[10:49:22 INFO]: [SigCommonCore] !-----------------------------------------------------!

Code
image

@Backas03 Backas03 added the issue label Dec 24, 2024
@Backas03
Copy link
Author

Backas03 commented Dec 24, 2024

  • If the space before {current_output_reward} is removed, no error occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant