My query goes like this: If I have a feedItem (an image posted on facebook), how can I verify that I have liked it or not? Can I verify all the interactions which I have done to the feedItem or the interactions other people have done to it (like, dislike, pin, share)? Is there any way in getstream.io to retrieve these interactions?
Thanks in advance...
Graph API provides all functions you need. Here are some examples:
Read shares[it's a field of an object]: https://developers.facebook.com/docs/graph-api/reference/v3.1/post#read
Read Shared posts: https://developers.facebook.com/docs/graph-api/reference/v3.1/object/sharedposts
read likes:
https://developers.facebook.com/docs/graph-api/reference/v3.1/object/likes#read
/likes returns only the profile for the current user if read with a
user access token:
Album, Photo, Post, Video
all returns are JSON, which you can directly Deserialize Anonymous Type without using stream, for example, likes:
{
"likes": {
"data": [
{
"name": "Bill the Cat",
"id": "155111347875779",
"created_time": "2017-06-18T18:21:04+0000"
},
{
"name": "Calvin and Hobbes",
"id": "257573197608192",
"created_time": "2017-06-18T18:21:02+0000"
},
{
"name": "Berkeley Breathed's Bloom County",
"id": "108793262484769",
"created_time": "2017-06-18T18:20:58+0000"
}
],
"paging": {
"cursors": {
"before": "Nzc0Njg0MTQ3OAZDZD",
"after": "NTcxODc1ODk2NgZDZD"
},
"next": "https://graph.facebook.com/vX.X/me/likes?access_token=user-access-token&pretty=0&summary=true&limit=25&after=NTcxODc1ODk2NgZDZD"
},
"summary": {
"total_count": 136
}
},
"id": "user-id"
}
Related
I have a simple console application and it calls a Logic App by HttpRequest.
When the Logic App fails at any step I want to get exact the error message saying why it fails.
In the Logic App I can see the error.
Example: in the image, it fails at step 2 which it can't convert a string into an int. It's saying:
InvalidTemplate. Unable to process template language expressions in action 'Parse_JSON' inputs at line '0' and column '0': 'Required property 'content' expects a value but got null. Path ''.'.
which is what's I expect.
Here is my Logic App design:
But when I debug in a console application, it gives me a message "The server did not receive a response from an upstream server. Request tracking id 'some random Ids'." which is not very useful.
Here is my console application:
var obj = new
{
Age = "Twenty",
Name = "James"
};
using (var client = new HttpClient())
{
var content = new StringContent(JsonConvert.SerializeObject(obj));
content.Headers.ContentType.MediaType = "application/json";
var response = await client.PostAsync(url, content);
var errorMessage = await response.Content.ReadAsStringAsync();
//errorMessage: {"error":{"code":"NoResponse","message":"The server did not receive a response from an upstream server. Request tracking id 'some random Ids'."}}
}
So is there anyway to make the C# response return the error message in the step 2 of the Logic App?
What I expect is:
InvalidTemplate. Unable to process template language expressions in action 'Parse_JSON' inputs at line '0' and column '0': 'Required property 'content' expects a value but got null. Path ''.'.
Not:
{"error":{"code":"NoResponse","message":"The server did not receive a response from an upstream server. Request tracking id 'some random Ids'."}}
Thank you in advanced.
You can use actions('<Your_Previous_Step>')['error'] in your case actions('Parse_JSON')['error'] doing so you can able to retrieve the error message of that particular action.
Here is my logic app
I'm testing this through postman. Below is the response I received in postman.
Make sure you set Configure run after options to make the flow work even after it gets failed.
Updated Answer (General Solution)
In this case you can initialise a string variable and then add Append to string variable for each step so that it can catch the previous steps error. Below is the screenshot of my logic app.
Response in my postman
NOTE: Make sure you set Configure run after property for each action.
You can use the Scope action to encase the vast majority of other actions and then if something fails, you can catch the step for which it fails at.
You can load this JSON definition into your own tenant and see a working version.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Filter_array": {
"inputs": {
"from": "#variables('Result')",
"where": "#equals(item()['status'], 'Failed')"
},
"runAfter": {
"Initialize_Result": [
"Succeeded"
]
},
"type": "Query"
},
"Initialize_Error_Message": {
"inputs": {
"variables": [
{
"name": "Error Message",
"type": "string",
"value": "#{body('Filter_array')[0]['error']['message']}"
}
]
},
"runAfter": {
"Filter_array": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Initialize_Integer_Variable": {
"inputs": {
"variables": [
{
"name": "Integer Variable",
"type": "integer",
"value": 1
}
]
},
"runAfter": {},
"type": "InitializeVariable"
},
"Initialize_Result": {
"inputs": {
"variables": [
{
"name": "Result",
"type": "array",
"value": "#result('Scope')"
}
]
},
"runAfter": {
"Scope": [
"Succeeded",
"FAILED"
]
},
"type": "InitializeVariable"
},
"Scope": {
"actions": {
"Set_Integer_Variable_(Step_1)": {
"inputs": {
"name": "Integer Variable",
"value": 2
},
"runAfter": {},
"type": "SetVariable"
},
"Set_Integer_Variable_(Step_2)": {
"inputs": {
"name": "Integer Variable",
"value": "#string('Test')"
},
"runAfter": {
"Set_Integer_Variable_(Step_1)": [
"Succeeded"
]
},
"type": "SetVariable"
},
"Set_Integer_Variable_(Step_3)": {
"inputs": {
"name": "Integer Variable",
"value": 3
},
"runAfter": {
"Set_Integer_Variable_(Step_2)": [
"Succeeded"
]
},
"type": "SetVariable"
}
},
"runAfter": {
"Initialize_Integer_Variable": [
"Succeeded"
]
},
"type": "Scope"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Month",
"interval": 12
},
"recurrence": {
"frequency": "Month",
"interval": 12
},
"type": "Recurrence"
}
}
},
"parameters": {}
}
Naturally, it's a little more intensive and follows the same principals as a normal flow for continuing to the next step after a failure but this will help you with larger flows.
This is what the test flow looks like ...
To explain it quickly, the middle steps are simple Set Variable actions that can be changed to cause the failure.
In the definition I've given you, step 2 will fail but you can change it to step 1 or 3 and you should still see the error come out at the end regardless of the step in the scope action that fails.
I suggest playing with it and looking at the output to the scope action, which is written to variable Result in the Initialize Result step.
For reference, this is the sort of information that comes out of the Scope action that you can use to determine what has failed.
{
"variables": [
{
"name": "Result",
"type": "Array",
"value": [
{
"name": "Set_Integer_Variable_(Step_1)",
"inputs": {
"name": "Integer Variable",
"value": 2
},
"outputs": {
"body": {
"name": "Integer Variable",
"value": 2
}
},
"startTime": "2022-04-22T06:55:57.8965917Z",
"endTime": "2022-04-22T06:55:57.9281959Z",
"trackingId": "0c93fa70-a552-4776-bce1-8ac889933de9",
"clientTrackingId": "08585509963278112157168286283CU11",
"status": "Succeeded"
},
{
"name": "Set_Integer_Variable_(Step_2)",
"startTime": "2022-04-22T06:55:57.9434709Z",
"endTime": "2022-04-22T06:55:57.9434709Z",
"trackingId": "f82b494b-0ecd-412b-887a-d4b08f4a5751",
"clientTrackingId": "08585509963278112157168286283CU11",
"code": "BadRequest",
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "The variable 'Integer Variable' of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable 'Integer Variable' only supports values of types 'Integer'."
}
},
{
"name": "Set_Integer_Variable_(Step_3)",
"startTime": "2022-04-22T06:55:57.9590957Z",
"endTime": "2022-04-22T06:55:57.9590957Z",
"trackingId": "f761d71f-8ec0-4a29-9a8a-a39a81faf660",
"clientTrackingId": "08585509963278112157168286283CU11",
"code": "ActionSkipped",
"status": "Skipped",
"error": {
"code": "ActionConditionFailed",
"message": "The execution of template action 'Set_Integer_Variable_(Step_3)' is skipped: the 'runAfter' condition for action 'Set_Integer_Variable_(Step_2)' is not satisfied. Expected status values 'Succeeded' and actual value 'Failed'."
}
}
]
}
]
}
Take note, you still need to apply the Configure run after properties to ensure it continues on after the Scope action finishes ...
You'd need to put some more error checking in but my suggestion would be to wrap all of that functionality into another LogicApp that you can reuse across your tenant. That's the thinking anyway.
Using C#, DocuSign API SDK 4.5.2.
I'm sending out 3 documents for signatures in the same envelope. Each document will use the same server template (which just places the signature elements over the document using anchor tags). I can send out the envelope and I get the email back from DocuSign to view/sign the documents.
The issue I'm having is when I go to sign, I have to sign each document 3 times -- 9 times total -- before I'm allowed to click the Finish button. There is only 1 place to sign on each document, but I have to click the sign button 3 times before it's accepted. If I have 2 recipients, it's the same for each of them. If I change the code to send out only 1 document, it works fine so it's obvious something is not being generated correctly in the envelope request.
I have also tried giving each recipient a different Id number even though there are only 2 roles and 2 distinct names/email addresses.
Right before I call the API to actually send the document, I capture the JSON for debugging purposes:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "---Document 1 Bytes---",
"documentId": "1",
"fileExtension": "pdf",
"name": "MultiDocument1"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "2",
"document": {
"documentBase64": "---Document 2 Bytes---",
"documentId": "2",
"fileExtension": "pdf",
"name": "MultiDocument2"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "3",
"document": {
"documentBase64": "---Document 3 Bytes---",
"documentId": "3",
"fileExtension": "pdf",
"name": "MultiDocument3"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
}
],
"emailSubject": "Multiple Documents for Signature",
"status": "Sent"
}
Here's one of the documents I'm using. The other 2 are similar -- different text, but using the same anchor tags.
I've also tried substituting another document I have used successfully in testing for Document 1 -- it is completely different, but still uses the same anchor tags. I'm getting the same results -- having to sign each signature 3 times.
Can anyone see what I'm doing wrong? If you need more information, please let me know.
thanks,
randy
Update: As suggested by Inbar and Larry, I contacted DocuSign Support and had the "Anchor Population Scope" setting changed from "Envelope" to "Document". Unfortunately, this made things worse. I still have to click the signature element multiple times to sign, but only the first document can be signed. The other documents do not have any signature elements attached.
Update #2: I'm wondering if the way I'm using templates might be confusing and causing these issues. I probably should have explained myself clearer. The server template I'm using has a "dummy" Word document that just contains a common set of anchor tags for signatures and dates. I uploaded it as a template and assigned the signature and date UI elements to the anchor tags. But when I'm sending a request from my application, I'm using a different document I choose/generate at runtime. This document replaces the dummy Word document in the template, but has the same anchor tags so all the signature & date elements find their places on the real document. This works great when sending out just 1 document, but I can't get things to work for more than one.
Update #3: Requirements -- We are adding digital signature capability to our website (ASP.NET, WinForms). We already have a page where an Advisor can either print out a document for a physical signature or start a digital signature process with DocuSign. All our documents come from MS Report Server because they need to contain Client data from our database. We currently do not send out any static documents. In the code behind on the page, I get the PDF bytes from Report Server and add that (as a document) to a composite template to be sent to DocuSign. It also contains a reference to a server template in my account of a Word document (see below) containing the anchor tags and signature elements (mentioned in Update #2) to be overlaid on the Report Server document. What happens is the Report Server document replaces the text of the Word template (like a form background) and because I'm using the same text as anchor tags, the signature elements on the Word template find their match on the Report Server document and move to their positions on the document. I finally include 1 or more names/email addresses of the Clients and usually 2 other required signers (Advisor and Manager). This is then sent to DocuSign (SDK API) to start the signing process. Using a single document, this is working well. We are preparing for when we will need to send more than 1 document to a Client and we'd like to do that in a single request. If you need more info, please let me know.
DocuSign Customer Service put me in touch with a Developer Support Representative who was VERY patient and helpful. I explained what I was trying to do and he was able to come up with a solution which was very easily integrated into my existing codebase.
To get this to work, you need 2 pieces of the puzzle. The first item was mentioned above: you must have the Anchor Population Scope value in your account set to "Document". This has to be done by a DocuSign Customer Service rep as the setting is not user accessible.
The second item was what was contributing to the signature tags all being stacked on the first document. In your Composite Template, the Inner Template must have a sequence number of "1" and the Server Template must use a sequence number of "2". Once both of these items were in place, I could send out multiple documents each using the same server template (to define AutoPlace tags and roles) to multiple signers in a single envelope.
Here's the sample JSON which works for me:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "1",
"fileExtension": "PDF",
"name": "MultiDocument1"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "2",
"fileExtension": "PDF",
"name": "MultiDocument2"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
},
{
"compositeTemplateId": "3",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "3",
"fileExtension": "PDF",
"name": "MultiDocument3"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
}
],
"emailSubject": "Multiple Documents for Signatures",
"status": "Sent"
}
If you have any questions, please let me know. Thanks to Larry K and Inbar Gazit for the assist!
I believe the problem is that your account is set so that anchor tab positioning works across all of the documents in the envelope, not just the one document that you're applying the template to.
So you're ending up with three signing fields, positioned directly on top of one-another.
Suggestions for fixing:
Only apply the last template.
Or have your account changed so anchor positioning only affects the document the template is applied to.
I need to send google analytics event from the server but can not find documentation on how to map the object properly.
I need to send event like this
{
"event": "nameOfEvent",
"ecommerce": {
"currencyCode": "eur",
"purchase": {
"actionField": {
"id": "9d9e3cc9-0007-4aaa-d986-08d6g2f07b63",
"affiliation": "",
"revenue": 100
},
"products": [
{
"name": "Product name",
"id": "id",
"price": 200,
"category": "Category",
"variant": "Buy online",
"quantity": "1",
"dimension1": "1",
"dimension2": "2",
"dimension3": "3"
}
]
}
}
}
Result should be similar to https://www.google-analytics.com/debug/collect?v=1&t=event&tid=UA-222-1&uid=1&el=nameOfEvent& here I have a problem, what to do next???
I would appreciate any help with it!
Looks like a possible duplicate of this. Manually sending data to Google Analytics.
The above post has references to C# implementation of the Google measurement protocol https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide.
On rare occasion when receiving the message "Additional text found in JSON string after finishing deserializing object." the first thing i do is fix some JSON structure typo of mine using JSONLint.
However this time the lint says the json is valid and i can't see where the problem lies. (As i don't control the data's source i need to ldeserialize to a generic object that i then traverse. - Is this possibly the error on my part?)
I'm deserializing with Unity specific Newtonsoft.Json (JsonNet-Lite)
object resultData = JsonConvert.DeserializeObject<object>(jsonString);
What am i missing?
JSON String
"{\"statements\":[{\"id\":\"14b6382c-ddb9-44c5-a22c-a133cec50711\",\"actor\":{\"objectType\":\"Agent\",\"mbox_sha1sum\":\"f7f99253cf6ede467c3a5425d05bfcd96e524595\",\"name\":\"My Name\"},\"verb\":{\"id\":\"https://w3id.org/xapi/dod-isd/verbs/completed\",\"display\":{\"en-US\":\"completed\"}},\"result\":{\"success\":true,\"completion\":true,\"duration\":\"PT0.05S\"},\"context\":{\"contextActivities\":{\"grouping\":[{\"id\":\"http://example.com/activities/MyActivity_Grandparent\",\"objectType\":\"Activity\"}],\"parent\":[{\"id\":\"http://example.com/activities/MyActivity_Parent\",\"objectType\":\"Activity\"}]}},\"timestamp\":\"2018-02-23T19:18:34.145Z\",\"stored\":\"2018-02-23T19:18:34.145Z\",\"authority\":{\"objectType\":\"Agent\",\"account\":{\"homePage\":\"http://cloud.scorm.com\",\"name\":\"abcdef-ghijk\"},\"name\":\"Test Provider\"},\"version\":\"1.0.0\",\"object\":{\"id\":\"http://example.com/activities/MyActivity\",\"definition\":{\"extensions\":{\"https://w3id.org/xapi/dod-isd/extensions/interactivity-level\":\"3\",\"https://w3id.org/xapi/dod-isd/extensions/ksa\":\"Attitude\",\"https://w3id.org/xapi/dod-isd/extensions/category\":\"Responding\",\"http://example.com/TerminalObjective\":\"My Activity Objective\"},\"name\":{\"en-US\":\"My Activity Name\"},\"description\":{\"en-US\":\"My Activity Description\"},\"type\":\"http://adlnet.gov/expapi/activities/simulation\"},\"objectType\":\"Activity\"}}],\"more\":\"/tc/Z5R2XATQZW/sandbox/statements?continueToken=e50555fe-0c3d-4663-91c4-7f0ff7df4ccf\"}"
JSON Formatted for readability
{
"statements": [{
"id": "14b6382c-ddb9-44c5-a22c-a133cec50711",
"actor": {
"objectType": "Agent",
"mbox_sha1sum": "f7f99253cf6ede467c3a5425d05bfcd96e524595",
"name": "My Name"
},
"verb": {
"id": "https://w3id.org/xapi/dod-isd/verbs/completed",
"display": {
"en-US": "completed"
}
},
"result": {
"success": true,
"completion": true,
"duration": "PT0.05S"
},
"context": {
"contextActivities": {
"grouping": [{
"id": "http://example.com/activities/MyActivity_Grandparent",
"objectType": "Activity"
}],
"parent": [{
"id": "http://example.com/activities/MyActivity_Parent",
"objectType": "Activity"
}]
}
},
"timestamp": "2018-02-23T19:18:34.145Z",
"stored": "2018-02-23T19:18:34.145Z",
"authority": {
"objectType": "Agent",
"account": {
"homePage": "http://cloud.scorm.com",
"name": "abcdef-ghijk"
},
"name": "Test Provider"
},
"version": "1.0.0",
"object": {
"id": "http://example.com/activities/MyActivity",
"definition": {
"extensions": {
"https://w3id.org/xapi/dod-isd/extensions/interactivity-level": "3",
"https://w3id.org/xapi/dod-isd/extensions/ksa": "Attitude",
"https://w3id.org/xapi/dod-isd/extensions/category": "Responding",
"http://example.com/TerminalObjective": "My Activity Objective"
},
"name": {
"en-US": "My Activity Name"
},
"description": {
"en-US": "My Activity Description"
},
"type": "http://adlnet.gov/expapi/activities/simulation"
},
"objectType": "Activity"
}
}],
"more": "/tc/Z5R2XATQZW/sandbox/statements?continueToken=e50555fe-0c3d-4663-91c4-7f0ff7df4ccf"
}
The deserialization method, you chose, is rather for a case, when you are deserializing a well-known Json to an object, which matches the structure.
In this case the Json structure does not match the System.Object type structure, you are trying to deserialize to. The library complaints, that there's much more in the Json, than in the System.Object structure.
For parsing any Json object, you could try an example from the Newtonsoft.Json documentation:
string json = #"{
CPU: 'Intel',
Drives: [
'DVD read/writer',
'500 gigabyte hard drive'
]
}";
JObject o = JObject.Parse(json);
You will still need to traverse the deserialized object. Depending on what you want to achieve, it may actually be much better to look for a .Net class that matches the Json structure (or write one).
I've tried 3 different JSON class generators, but I get an error when I try to generate a C# class from the following JSON output:
{
"status": "REQUEST_STATUS",
"language": "DOCUMENT_LANGUAGE",
"url": "REQUESTED_URL",
"text": "DOCUMENT_TEXT",
"entities": [
"entity": {
"type": "DETECTED_TYPE",
"relevance": "DETECTED_RELEVANCE",
"count": "DETECTED_COUNT",
"text": "DETECTED_ENTITY"
"disambiguated": {
"name": "DISAMBIGUATED_ENTITY",
"subType": "ENTITY_SUBTYPE",
"website": "WEBSITE",
"geo": "LATITUDE LONGITUDE",
"dbpedia": "LINKED_DATA_DBPEDIA",
"yago": "LINKED_DATA_YAGO",
"opencyc": "LINKED_DATA_OPENCYC",
"umbel": "LINKED_DATA_UMBEL",
"freebase": "LINKED_DATA_FREEBASE",
"ciaFactbook": "LINKED_DATA_FACTBOOK",
"census": "LINKED_DATA_CENSUS",
"geonames": "LINKED_DATA_GEONAMES",
"musicBrainz": "LINKED_DATA_MUSICBRAINZ",
"crunchbase": "CRUNCHBASE_WEB_LINK",
},
"quotations": [
{
"quotation": "ENTITY_QUOTATION"
}
],
"sentiment": {
"type": "SENTIMENT_LABEL",
"score": "SENTIMENT_SCORE",
"mixed": "SENTIMENT_MIXED"
}
}
]
}
The error is on the following line, at the bracket:
"entities": [
But all the examples I have found using the above two tools do have examples of using arrays like mine, so why does mine cause an exception. The exception is, "Invalid character and line 7 position 17.
If I change the straight brackets to currly brackets it will generate but that's changing the class, right?
things inside of arrays dont themselves have names so just change
"entities": [
"entity": {
"type": "DETECTED_TYPE",
to
"entities": [ {
"type": "DETECTED_TYPE",