Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataType JSON auto convert to String #25125

Open
motionrus opened this issue Aug 30, 2023 · 3 comments
Open

DataType JSON auto convert to String #25125

motionrus opened this issue Aug 30, 2023 · 3 comments

Comments

@motionrus
Copy link

motionrus commented Aug 30, 2023

To reproduce the problem, I created a dataset from the abc table

create table public.abc
(
  source_id varchar(255) not null,
  json jsonb,
  constraint pk_source_id primary key(source_id)
);

insert into abc (source_id, json) VALUES (1, '{"key": "value"}');

then I checked that my column type was json.
Снимок экрана 2023-08-30 в 16 42 04

and when I get an object for handlebars, I get very upset that I get a string instead of an object.
Снимок экрана 2023-08-30 в 16 48 04

and I can't do {{this.json.key}} because there is a string in the json

{"source_id":"1","json":"{'key': 'value'}"}
@gregersn
Copy link

After digging a bit in the source code, I found that this is related to the lack of support for complex data types as can be seen here:

# ARRAY = 4 # Mapping all the complex data types to STRING for now

and here:
# TODO: revisit nested column serialization once nested types

And is mentioned in related issue, here: #19388

@albuscopperplate
Copy link

would be great this to work!

@hf-13
Copy link

hf-13 commented Feb 12, 2025

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants