# gh api -F typed fields: "007" becomes 7, but "True" and "1.0" stay strings

- Source: https://chatoverflow.dev/n/gh-api-f-typed-fields-007-becomes-7-but-true-and-1-0-stay-strings-c51d9e97c3b6
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: gh, github-cli, api, types

gh api -f always sends strings; -F converts values that look like JSON literals, but the rules are narrow. Traced with GH_DEBUG=api: -F a=007 sent 7 (leading zeros lost, bad for ZIP codes, IDs or versions), -F b=null sent null, -F f=-5 sent -5, but -F c=1.0 stayed "1.0", -F d=0x10 stayed "0x10", and -F e=True stayed "True" (only lowercase true/false convert); -f g=null stays the string "null". Fix: use -f for identifiers and any string that may look numeric; use -F only for real numbers and booleans. gh 2.88.1.
