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

net.jimblackler.usejson.SyntaxError: JSON5: invalid end of input at 1:1 #31

Open
tanmaymanolkar1 opened this issue Oct 5, 2023 · 15 comments

Comments

@tanmaymanolkar1
Copy link

For the past 3 days we have been getting this error
image

we are using
sonGeneratorVersion = "0.4.3"
jsonSchemaFriendVersion = "0.9.1"

Thanks for the help in advance!

@jimblackler
Copy link
Owner

jimblackler commented Oct 5, 2023 via email

@tanmaymanolkar1
Copy link
Author

tanmaymanolkar1 commented Oct 5, 2023

is there any guidance I can follow to locate and delete the schema cache @jimblackler

@tanmaymanolkar1
Copy link
Author

The Usage link is not working, I was looking if any guidance was mentioned in the link.
https://javadoc.jitpack.io/com/github/jimblackler/jsonschematypes/jsonschemafriend/0.12.0/javadoc/net/jimblackler/jsonschemafriend/package-summary.html

image

@jimblackler
Copy link
Owner

jimblackler commented Oct 5, 2023 via email

@tanmaymanolkar1
Copy link
Author

tanmaymanolkar1 commented Oct 5, 2023

Thank you for the quick update. @jimblackler

I am seeing this error in the stack trace.
I am using these versions
testImplementation "net.jimblackler:jsongenerator:0.4.6"
testImplementation "net.jimblackler:jsonschemafriend:0.12.1"

image

@jimblackler
Copy link
Owner

jimblackler commented Oct 5, 2023 via email

@tanmaymanolkar1
Copy link
Author

tanmaymanolkar1 commented Oct 5, 2023

great thanks, will let you know how it goes

@tanmaymanolkar1
Copy link
Author

Not able to find the package "net.jimblackler:jsongenerator:0.4.7" yet, I guess its taking time to get uploaded
image

@jimblackler
Copy link
Owner

jimblackler commented Oct 5, 2023 via email

@tanmaymanolkar1
Copy link
Author

I am using this method generate() from net/jimblackler/jsongenerator/Generator.java
image

And the object we are getting back is not of type JSONObject or JSONArray

image

and we end up with
java.lang.IllegalArgumentException: object is not a JSON Object

I am using the following versions, we are not taking in the dependency on jsonschematypes library
/
image

Any idea what might have changed and how we can get past this issue

@tanmaymanolkar1
Copy link
Author

tanmaymanolkar1 commented Oct 13, 2023

One main difference I see when this library worked
Warning: Nashorn engine is planned to be removed from a future JDK release

to now when it is now working : I do not see the above warning

Is there any chance the Nashorn engine might be causing issues?

Also when in the JSON, I pass an object, it is not being parsed, that is no strings are being created for it from the generator, could you help me understand why is that? @jimblackler

@tanmaymanolkar1
Copy link
Author

a ping on the question above @jimblackler @jimblacklercorp

@jimblackler
Copy link
Owner

What is the type you are getting back?

@tanmaymanolkar1
Copy link
Author

I am getting LinkedHashMap back @jimblackler, the issue I am seeing is that in nested json schema, where the parent JSON refers to child JSON objects, and the child JSON objects are not being tested, I get them as empty (unpopulated).

Do you reckon taking in the dependency on jsonschematypes library would help?

@jimblackler
Copy link
Owner

jimblackler commented Oct 18, 2023 via email

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

No branches or pull requests

2 participants