Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

srp json

Is there code available that will create a json from a given dictionary for 1 or more records.

Comments

  • To be sure I understand, you're hoping we have boilerplate code for converting a multi-value record into a JSON structure using the record's dictionary. That would be a useful routine, but I have not written one. Don has used SRP_JSON the most, and I am pretty sure he manually maps data into JSON structures, but I'll ask him.
  • Barry,

    We have not created any wrappers that do what you suggest. One problem is that such a tool would not be capable of distinguishing those columns which should be excluded, such as synonyms or calculated columns which serve no purpose in a JSON export of the data.

    You would also need to decide how best to manage AMV columns. If the dictionaries are well formed with group names then this could be easier to accomplish. However, our experience is that dictionaries tend not to be managed as well as they should be.

    I am not trying to discourage the development of such a tool but I would recommend that some effort be put into defining which columns are transferred. This would be similar to the way the C/S Workspace allows you to define datasets. You could even have more than one dataset against the same table. We do something similar to this but within a quasi-reporting tool called SRP Query. We store configuration records (aka datasets) in the dictionary table using the % character to surround the names.
  • Yes, thanks for converting my request to 'techo' speak. ;-)
  • Don,

    Thank you

    There are some technical parts in the srp_json that I don't quite understand, so I will discuss with you when we meet up in a couple of weeks. (if I dont need it before then)
  • Barry,

    One of the libraries you'll soon be receiving is call HTTP_JSON_Services. In there you will find examples of the syntax we use to produce JSON content. Hopefully that will set you on a right path.
  • Damn, I forgot I remembered seeing that.
    Thanks heaps.

    But I am still coming :-)
Sign In or Register to comment.