Jump to content

com.google.gson.stream.MalformedJsonException: Unterminated object at line 18 column 10 path $.key.O


J0WAY

Recommended Posts

So i was trying to code a crafting recipe and i was using minecraft sticks in it, Well i made the crafting recipe and here it is
 

{
    "type": "minecraft:crafting_shaped",
    
    "pattern":
    [
        " O ",
        " O ",
        " S "
    ],
    
    "key":
    {
        "O":
        {
            "item": "ss:obsidian_shard"
        }

        "S":
        {
            "item": "minecraft:stick"
        }
    },
    
    "result":
    {
        "item": "ss:obsidianshard_sword",
        "count": 1
    }
}
I'm pretty sure i put everything right but it keeps saying that it's wrong, If someone knows how to fix this i would love to know.

Link to comment
Share on other sites

4 minutes ago, J0WAY said:

Expecting comma or }, not string. It thinks when i do "S" It's for string

Actually, it's telling you that there should be a comma or } there instead of a string. "S" is a string, and there should be a comma there instead, because you're currently missing one.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Link to comment
Share on other sites

7 minutes ago, J0WAY said:

Well would i replace the S with a } because that makes no sense

Actually, I meant that you should add a comma into the place where you're missing one (right before "S"). "O" is currently an unterminated object, because it doesn't have a comma separating it from "S".

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Link to comment
Share on other sites

4 minutes ago, J0WAY said:

Yes okay it does work thank you, I did read that message but for some reason i was thinking, Well why would i need it there but now i know.

You should also get a json editor plugin for your IDE so this doesnt happen again. 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.