Solved

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

  • 10 February 2022
  • 5 replies
  • 10 views

Badge +3

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"),

 

icon

Best answer by ebygomm 10 February 2022, 13:18

View original

5 replies

Userlevel 4

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

Badge +3

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)

Badge +3

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

Badge +10

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

Badge +3

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