# Terminal output / Candid / dcli

**URL:** <https://forum.dfinity.org/t/terminal-output-candid-dcli/4987>\
**Category:** Developers\
**Created:** [June 9, 2021, 1:48pm UTC](https://forum.dfinity.org/t/terminal-output-candid-dcli/4987 "2021-06-09T13:48:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seb](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/seb/32/10340_2.png) [@Seb](https://forum.dfinity.org/u/Seb)\
**Post date:** [June 9, 2021, 1:48pm UTC](https://forum.dfinity.org/t/terminal-output-candid-dcli/4987/1 "2021-06-09T13:48:09Z")

</div>

Hello!  
I wasn’t sure how to name the topic.  
I was playing with the random module; I’m using this function.

```auto
public func play () : async Blob {
       let y = await Random.blob();
       return (y);
    };

```

When I use dfx canister to call this function the output in the terminal is something like that  
: (blob “1\93\eb\d4+U\deH\92\9b9\149d}\fc.\a7RU\cf\feM!\9f\ca\12\e0\e9F\fc\dc”).

However I’ve tried to output the raw data and then using the candid tool didc to decode the raw data and in this case I do get my 32 bytes printed correctly:

 ![Capture d’écran 2021-06-09 à 15.45.04](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/d/d7d658dfd1082ac0f44fb37b05ffd78d81c0a73a.jpeg)

(I’ve counted they are 32!)

What is happening here? Why does dfx is not able to decode the raw data correctly?

---

<div class="post-metadata">

**Author:** ![paulyoung](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/paulyoung/32/5251_2.png) [@paulyoung](https://forum.dfinity.org/u/paulyoung)\
**Post date:** [June 9, 2021, 1:54pm UTC](https://forum.dfinity.org/t/terminal-output-candid-dcli/4987/2 "2021-06-09T13:54:50Z")

</div>

I suspect because Candid is only one data format, and `dfx` doesn’t impose any restrictions around that.

In theory you could use protobuf or your own format and `dfx` doesn’t know about those either.

---

<div class="post-metadata">

**Author:** ![Seb](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/seb/32/10340_2.png) [@Seb](https://forum.dfinity.org/u/Seb)\
**Post date:** [June 9, 2021, 2:09pm UTC](https://forum.dfinity.org/t/terminal-output-candid-dcli/4987/3 "2021-06-09T14:09:25Z")

</div>

Yes but I thought that the default format for data read by dfx was precisely Candid, so it should be able to read the blob correctly.

---

<div class="post-metadata">

**Author:** ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)\
**Post date:** [June 9, 2021, 6:48pm UTC](https://forum.dfinity.org/t/terminal-output-candid-dcli/4987/4 "2021-06-09T18:48:53Z")

</div>

You might be using an old `didc` binary. `blob "1\93\eb\d4+U..."` is a shorthand for `vec nat8`. See [candid/Candid.md at master · dfinity/candid · GitHub](https://github.com/dfinity/candid/blob/master/spec/Candid.md#syntactic-shorthands-1).

The first ascii character `1` corresponds to `49`, which is the ascii code for `1`. The second character `\93` corresponds to `93` in hex, which is 147 in decimal, so `blob "1\93"` is the same as `vec {49; 147}`
