[JAVA-2116] How can I get to the raw json returned by a query Created: 15/Feb/16 Updated: 11/Sep/19 Resolved: 15/Feb/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Emrah Diril | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I'm interested in getting the raw json from my queries: db = new Mongo().getDB("myDatabase"); And "String raw = cursor.next().toString();" will allow me to get the raw json for my query. However getDB() is deprecated and as far as I can tell the new getDatabase() line of API calls convert the json results to java objects automatically. My question is, how can I get to the raw json returned by a query using the getDatabase() line of API calls like I used to? Thanks |
| Comments |
| Comment by Emrah Diril [ 15/Feb/16 ] |
|
Actually I figured out that I can use MongoCursor in a similar way. You can delete/ignore this issue. |