Comments (3)
Sorry for the delay, I wanted to find out if you are still having this problem. Let me know.
from json-data-generator.
Hi, I think I also met the similar problem as the question provider in this post. But right now I just resolved it by modifying the source code which I think might not be an elegant solution.
So the case is, I am using JSON-data-generator to an endpoint provided by POWER BI for data visualization through HTTPS request. But my POWER BI service just couldn't receive any data thro REST API. Thus, I just took a lot of time debugging it and finally found that the problem came from the json format.
For POWER BI(I am not sure about other services), the example data in the documentation
{"timestamp":1430244584899,"system":"BADGE","actor":"bob","action":"LOGOUT","objects":["Building 1"],"location":{"lat":-19.4224,"lon":-165.0512},"message":"Entered Building 1"}
should be restricted as:
[{"timestamp":1430244584899,"system":"BADGE","actor":"bob","action":"LOGOUT","objects": "Building 1","location":"lat:-19.4224, lon:-165.0512","message":"Entered Building 1"}]
//pay attention to that array and objects are not allowed in the content field;
The solution is I manually added a pair of "[]" to wrap the original json as an array with one item in EventLogger.java. In this case, it's better to add a configuration interface in WorkFlow.json to allow users to reprensent json as object or array. (just my objective opinion on this tool).
Hope it will help the people with the same problem. Cheers!
from json-data-generator.
So based on @icesuperbravo's feedback, it seems like this is a data format problem and could probably be handled as a specific Logger configuration option. If the receiving endpoint needs the data as an array, then the Logger should handle that. The HttpLogger that you guys are using is a generic logger that assumes that it can just post each event as a json object. Other loggers do things like flatten the json before sending it. So if the POWER BI or other service expects the format to be different, then a customer Logger may be in order.
from json-data-generator.
Related Issues (20)
- Generate JSON web server logs HOT 2
- Any plans to support SQS producer? HOT 1
- Need help to change the configuration file to limit the numbers of record i create
- Integer values within JSON array are not been maintained
- Can't generate array of double HOT 2
- support for Basic Auth in HttpPostLogger
- Writing multiple iterations to a single file HOT 3
- Error while using the repeat() function in my Workflow defenition HOT 6
- data generator to kafka
- Troubles running default config
- BUG: closing parenthesis ")" breaks parsing arguments HOT 1
- Upgrade jackson-databind to 2.9.10
- Upgrade mqtt library to v1.2.2
- Properties from prev step.
- Not able to generate JSON output from the schema HOT 1
- HTTP-POST error 404 HOT 1
- Main thread never terminates HOT 1
- How to generate multiple pieces of data in one json file instead of one line of data per file HOT 1
- Allow a DataSource to be used to provide values in generated items HOT 1
- Adding custom function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-data-generator.