PlatformIO Community

Need to create a new library

Hi! i’m trying to upload a custom library for my educational robot , but i get the next error :

Error: Could not parse manifest -> No JSON object could be decoded

here is my JSON file : https://github.com/cerebro11101/cerebro/blob/master/library.json

can anyone help me please?

Not quite sure what happened there with your link… I suspect you mean this file?

The raw JSON is fine, and nothing jumps out re: PlatformIO requirements.

When you say upload, do you mean when you try to use the code in a project, or are you trying to register the library on the PlatformIO registry?

hi @pfeerick i’m trying to registry my own library

i had the next error:

when i write this line in console:

platformio lib register https://github.com/cerebro11101/CerebroBoards/blob/master/library.properties

and this is the output error:

Error: Could not parse manifest -> No JSON object could be decoded

You’re giving it a Arduino-style library.properties not a JSON file. Also you’re giving it a link to the GitHub frontpage, not the direct source of the file. You should do

platformio lib register https://raw.githubusercontent.com/cerebro11101/CerebroBoards/master/library.json

That’s still a valid library manifest format to use for registering a library. The error looks to be a generic exception, which is wrong anyway, as it should have identified the url as being a pointer to a manifest of type ManifestFileType.LIBRARY_PROPERTIES. Anyway, giving the proper http link to the file should have fixed it.

1 Like