Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Performance Testing with JMeter  3

You're reading from   Performance Testing with JMeter 3 Enhance the performance of your web application

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787285774
Length 166 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bayo Erinle Bayo Erinle
Author Profile Icon Bayo Erinle
Bayo Erinle
Arrow right icon
View More author details
Toc

The JSON Path Extractor element


Another helpful nugget in the JMeter plugin's project is the JSON Path Extractor element. This makes working with JSON pure bliss. It helps extract data out of a JSON response using JSONPath syntax (http://goessner.net/articles/JsonPath/index.html#e2). For complex JSON structures, using JMeter's bundled XPath Extractor can sometimes lead to heartache when trying to get at targeted elements. Where XPath Extractor fails, JSON Path Extractor shines.

Consider a JSON structure like the following:

{ "store": { 
    "book": [  
{ "category": "reference", 
        "author": "Nigel Rees", 
        "title": "Sayings of the Century", 
        "price": 8.95 
      }, 
{ "category": "fiction", 
        "author": "Evelyn Waugh", 
        "title": "Sword of Honour", 
        "price": 12.99 
      }, 
{ "category": "fiction", 
        "author": "Herman Melville", 
        "title": "Moby Dick", 
        "isbn": "0-553-21311-3", 
        "price": 8.99 
      }, 
{ "category"...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime