Skip to main content
Solved

json templater edit my null attribute value to ""(two double quotes)

  • February 10, 2022
  • 5 replies
  • 127 views

f.kemminje
Contributor
Forum|alt.badge.img+11

In the source json file values.available_sf was null. i created a json templater

and 

 

assign this null value to BuildingSqFtTotal jason object.

 

but after templater I got this "BuildingSqFtTotal" : ""

I need "BuildingSqFtTotal" : null

 

@david_r​ or anyone can you pls help

 

"BuildingSqFtTotal": fme:get-attribute("values.available_sf"),

 

Best answer by ebygomm

I think you need to make the attribute missing if you want to see null (no quotes) in the JSON output

View original
Did this help you find an answer to your question?

5 replies

david_r
Celebrity
  • February 10, 2022

Have you tried using a NullAttributeMapper to make sure that values.available_sf contains a <null> value and not an empty string?


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • February 10, 2022
david_r wrote:

Have you tried using a NullAttributeMapper to make sure that values.available_sf contains a <null> value and not an empty string?

yes i tried, but not successful. any attribute if it is null, the template makes it as ""(double quote)


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • February 10, 2022

@david_r​ David, here is my , template fme file


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • February 10, 2022

I think you need to make the attribute missing if you want to see null (no quotes) in the JSON output


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • February 10, 2022
ebygomm wrote:

I think you need to make the attribute missing if you want to see null (no quotes) in the JSON output

yes, this is worked :) Thanks. But totally confused.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings