# Logstash path type Vs string type

**URL:** <https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924>\
**Category:** Logstash\
**Created:** [April 20, 2020, 7:05pm UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924 "2020-04-20T19:05:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [April 20, 2020, 7:05pm UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924/1 "2020-04-20T19:05:42Z")

</div>

Where is the real difference between "path" and string" and "hash" . In terms of appearance, both look similar to the end user . How they are treated _anything_ differently behind the scenes ?  
[https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html#path](https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html#path)

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 20, 2020, 8:43pm UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924/2 "2020-04-20T20:43:49Z")

</div>

A path is a string that is also a valid file system path for the system running logstash.

A hash is a group of one or more key-value pairs, definitely very different to a string.

---

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [April 21, 2020, 5:45am UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924/3 "2020-04-21T05:45:53Z")

</div>

> A path is a string that is also a valid file system path for the system running logstash.
> 
> A hash is a group of one or more key-value pairs, definitely very different to a string.

Understood, All look a like, there is really no difference between path and string as both are same unless the corresponding plugins treat them differently. Then , it is responsibility for the plugin to validate them accordingly ?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 21, 2020, 3:50pm UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924/4 "2020-04-21T15:50:17Z")

</div>

> [@nages](#):
>
> it is responsibility for the plugin to validate them accordingly ?

Yes, the plugin [tags each option](https://github.com/logstash-plugins/logstash-filter-translate/blob/a38dc5dbbc07c309035cb6dd89856690fb695980/lib/logstash/filters/translate.rb#L88) with its type.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 19, 2020, 3:50pm UTC](https://discuss.elastic.co/t/logstash-path-type-vs-string-type/228924/5 "2020-05-19T15:50:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
