# Does anyone know what the definition of the 'using' key in json is?

**URL:** https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714
**Category:** The Toolbox
**Created:** [October 19, 2019, 3:13am UTC](https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714 "2019-10-19T03:13:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![snipercup](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/snipercup/32/6932_2.png) [@snipercup](https://discourse.cataclysmdda.org/u/snipercup)
#### Post date: [October 19, 2019, 3:13am UTC](https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714/1 "2019-10-19T03:13:56Z")

</div>

I can’t find it anywhere and it’s a bit confusing. For example the sheet\_metal recipes in this file:

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/e7852b17e2c14b6e6b6265d0c8d4c34744bb66b9/data/json/recipes/other/parts.json>

in one it uses ‘steel\_standard’ like this:

```
"using": [[ "forging_standard", 5], ["steel_standard", 6] ],

```

and in another it’s a component:

```
"components": [[ [ "sheet_metal_small", 24] ] ]

```

I would think that the steel\_standard should be in ‘components’ rather then ‘using’.

I have seen cooking oil in the ‘using’ key when using it to cook something. In that case I wouldn’t call it a component since it is not necessarily consumed by the result. But if the ingredient is part of the result shouldn’t it be in ‘components’ rather then ‘using’?

---

<div class="post-metadata">

### Author: ![anothersimulacrum](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/anothersimulacrum/32/10770_2.png) [@anothersimulacrum](https://discourse.cataclysmdda.org/u/anothersimulacrum)
#### Post date: [October 19, 2019, 3:20am UTC](https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714/2 "2019-10-19T03:20:37Z")

</div>

Using is how you specify that it should use a [requirement](https://github.com/CleverRaven/Cataclysm-DDA/tree/master/data/json/requirements).  
These can be compnents, in which cause you can put them in components like this  
`["requirement", number, "LIST"]`,  
but they can also have tools and qualities, like this one.

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/3b79f5318e6d2f0962c9d6690a32fc820070af10/data/json/requirements/toolsets.json#L43>

---

<div class="post-metadata">

### Author: ![anothersimulacrum](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/anothersimulacrum/32/10770_2.png) [@anothersimulacrum](https://discourse.cataclysmdda.org/u/anothersimulacrum)
#### Post date: [October 19, 2019, 3:43am UTC](https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714/3 "2019-10-19T03:43:34Z")

</div>

Handled in the code around here

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/3b79f5318e6d2f0962c9d6690a32fc820070af10/src/recipe.cpp#L194>

---

<div class="post-metadata">

### Author: ![snipercup](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/snipercup/32/6932_2.png) [@snipercup](https://discourse.cataclysmdda.org/u/snipercup)
#### Post date: [October 19, 2019, 5:08am UTC](https://discourse.cataclysmdda.org/t/does-anyone-know-what-the-definition-of-the-using-key-in-json-is/21714/4 "2019-10-19T05:08:02Z")

</div>

Thanks for the reply. It’s more clear to me now. I am actually working on some item weights and was wondering if components in ‘using’ should always count towards the total resulting weight. Seems to me like that is the case.
