i have imported jar file for java and used in the ...
# community-help
v
i have imported jar file for java and used in the spring boot but i am getting an infinite popup with this data, how i am supposed to resolve it ?
k
These log lines don't seem to be related to Typesense.
v
Resolved, logging issue...
Is there a way where we can pass JSON array instead of json lines as you mentioned in the documentation
Copy code
String documentList = "{\"countryName\": \"India\", \"capital\": \"Washington\", \"gdp\": 5215}\n" +
                      "{\"countryName\": \"Iran\", \"capital\": \"London\", \"gdp\": 5215}";
// Import your document as JSONL string from a file.
client.collections("countries").documents().import_(documentList, queryParameters)
k
No, you have to send via json lines. Some clients support a wrapper that can do this for you, but don't think the Java client has that.
v
i have checked some resources but not able to find out how to convert a array of json object to jsonline formate
k
Convert each object to json string, so end up with Array of string. Then you have to join array elements with new line separator, e.g like this: https://stackoverflow.com/questions/1978933/a-quick-and-easy-way-to-join-array-elements-with-a-separator-the-opposite-of-sp