servoy 6.4 will not recognize json column

Hello all

I have upgraded to Postgresql-9.3 to take advantage of the json features within the database.

I created a column “referral_json” with the data type as json

I can write queries to insert jsons into the column, and run queries to find data within the json using psql and PgAdmin with no problems.
However, when I start up Servoy to view the table and column, the column lists as “text” and I cannot write json data from within Servoy to that column.
I even modified the column within Servoy to 5000 characters since I could not adjust the type to json within servoy. Even then, it will only populate the first 8 (if I remember correctly) characters then errors.

There currently is a varchar (5000) column that the json text is captured in.
The data comes in and Velocity Reports slings the json into the text column “referral_data”.

What I would like to to is add a method that would also place it in the json column at the same time. When I know it is working flawlessly, I can remove the velocity reports functions and capture the json directly into the database.

Can someone assist? If I need to provide more information I will gladly do so.

I just want servoy to “see” the json column I created within Postgresql and be able to write json data to it.

Thanks

Hi:

First, I have not used this feature of postgresql (very interesting) but I think that can you try the next:

If you uses getDatasetByQuery with a sql query, what result get it? If this is a string with json format, can you serialize and create a dataset with the resultant object.

If this not result and you only use Postgres, can also create in the database one procedure that receive the parameter to sql compose and return in a “compatible” format to Servoy. The call to a procedure is by “select” command, therefore, from Servoy also we can calling it with getDataSetByQuery.

Please, if this work (more or less) fine, you tell us ;-)

Best regards,

Hi Steve,

stevek:
Even then, it will only populate the first 8 (if I remember correctly) characters then errors.

What is the exact error ?