Skip to main content
Solved

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

  • February 10, 2022
  • 5 replies
  • 151 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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

david_r
Celebrity
  • 8392 replies
  • 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
  • 189 replies
  • 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?

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
  • 189 replies
  • February 10, 2022

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


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • 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
  • 189 replies
  • February 10, 2022

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.